Fix: F10 menu and corner panels stretched on monitors that aren't 16:9 #115

Manually merged
github merged 1 commit from github-bot/gh-115 into main 2026-12-05 19:14:23 +00:00 AGit
Owner

@⁠compl3xity1337 on GitHub · 2026-12-05 18:56 UTC · original
compl3xity1337:pr/overlay-aspect → main · +93 −18 · 1 files · 1 commits · merged 2026-12-05 19:11 UTC

What

Since the 16:9 letterbox (#22), the window stretches the swap chain's buffer to the monitor's shape, and the title's picture is drawn narrower to make up for it (planes::aspect_viewport). The overlay's panels (the F10 menu and the corner panels) were not drawn narrower, so on 21:9 or 16:10 monitors they came out stretched.

Each panel is now squeezed by the same factor before it is copied in. The squeeze is a box filter, each pixel the mean of the ones it covers. The factor is part of the cached panel's key, so the panel is redrawn when the output changes. Corner insets come back from the drawing step together with the picture.

Testing

Tested in game: the F10 menu keeps its shape on a monitor that is not 16:9. With a 16:9 output the factor is 1 and nothing changes.

🤖 Generated with Claude Code

**@⁠compl3xity1337** on GitHub · 2026-12-05 18:56 UTC · [original](https://github.com/gamingwithhomie/larp/pull/115) `compl3xity1337:pr/overlay-aspect` → `main` · +93 −18 · 1 files · 1 commits · merged 2026-12-05 19:11 UTC ## What Since the 16:9 letterbox (#22), the window stretches the swap chain's buffer to the monitor's shape, and the title's picture is drawn narrower to make up for it (`planes::aspect_viewport`). The overlay's panels (the F10 menu and the corner panels) were not drawn narrower, so on 21:9 or 16:10 monitors they came out stretched. Each panel is now squeezed by the same factor before it is copied in. The squeeze is a box filter, each pixel the mean of the ones it covers. The factor is part of the cached panel's key, so the panel is redrawn when the output changes. Corner insets come back from the drawing step together with the picture. ## Testing Tested in game: the F10 menu keeps its shape on a monitor that is not 16:9. With a 16:9 output the factor is 1 and nothing changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Since the 16:9 letterbox (#22) the window stretches the swap chain's buffer to the
monitor's shape, and the title's picture is drawn narrower to make up for it. The
overlay's panels were not, so on 21:9 or 16:10 they came out stretched. Each panel is
now squeezed by the same factor (box-filtered) before it is copied in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 19:01:24 +00:00
github-bot referenced this pull request from a commit 2026-12-05 19:14:19 +00:00
github manually merged commit f20975613e into main 2026-12-05 19:14:23 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.