Conversation
ES sizes and anchors its own dialogs as fractions of the whole canvas. That is right when the window maps 1:1 onto one panel, but dual-screen handhelds run a single oversized window across two panels and crop it, so the canvas is much wider than the visible UI area. On an AYN Thor (4400x1080 canvas, UI panel at canvas x 1240..3160) the on-screen keyboard is 0.78 * 4400 = 3432px wide: a third of it renders into a region no panel shows, the rest onto the art panel. The input config wizard (0.6 * W), file browser (0.65 * W), scraper (0.9 * W) and the slider bars (0.25 * W) break the same way, and edge-anchored overlays such as the volume indicator (x = 0.02 * W) land off-screen entirely. Add MenuOffsetX/MenuOffsetY/MenuWidth/MenuHeight, exposed through Renderer::getMenuRect(), and lay dialogs out inside that rect instead of the raw canvas. All four default to 0, which means "use the whole canvas" -- so behaviour is unchanged on every device that does not set them. Themed view geometry is deliberately untouched: the theme positions those elements and they are already correct. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds four settings —
MenuOffsetX,MenuOffsetY,MenuWidth,MenuHeight— exposed asRenderer::getMenuRect(), and lays ES's own dialogs out inside that rect instead of the rawcanvas.
All default to
0= whole canvas, so any device that doesn't set them takes exactly thecurrent code path.
Why
This is enabling work for dual-screen themes. Every EmulationStation theme today is
single-screen, so nothing currently trips over this — but a dual-screen theme cannot be built
without it.
Dual-screen handhelds have no combined framebuffer. The way a dual-screen theme works is to run
ES as one oversized window spanning both panels and let the panels crop it, then place each
element in whichever slice of the canvas maps to a physical panel. That makes the canvas much
wider than the visible UI area, and ES's own dialogs — sized as fractions of
getScreenWidth()—spill outside it.
On an AYN Thor (4400x1080 canvas, UI panel at canvas x 1240..3160) the on-screen keyboard, input
config wizard, file browser, scraper, slider bars and the side-sliding system menu all render
partially off-screen.
A theme can't fix it (
ThemeData::ThemeMenuhas nopos/size), and neither can a differentcanvas: putting the canvas centre on the UI panel while covering both panels forces the width.
Net effect: nothing changes for any existing theme or device, and dual-screen themes become
buildable.
Diff shape
52 files, +288/-217. 41 are dialog classes taking a mechanical substitution:
Real logic is in 4 files:
Settings.cpp(+9),Renderer.h(+9),Renderer.cpp(+48),SystemView.cpp(+9/-5).Themed view geometry is deliberately untouched — the theme positions those and they're already
correct. No CLI flag; no device, driver, boot or emulator code touched.
Validation
Containerised harness (headless sway + grim) runs ES at 4400x1080 and measures dialog extent
from screenshots.
On hardware (AYN Thor, ROCKNIX nightly
20260820, SM8550), same dialog.Before:

After:

AI Usage
Did you use AI tools to help write this code? YES
Claude (Anthropic) did the diagnosis, implementation, harness and cross-build. The final result
was verified by hand on a physical AYN Thor.