Fix fullscreen scaling when going fullscreen before Run#231
Merged
Conversation
Going fullscreen before starting emulation broke the scaling: the machine rendered small in the top-left with the rest of the screen black. Starting emulation first and going fullscreen afterwards was fine. resize_for_active_panel asks the window for a canvas-sized inner size whenever a panel opens or closes. On a fullscreen window that resizes nothing and just shrinks the drawable into a corner (macOS and Windows; Linux window managers ignore the request). Skip it while fullscreen, so the display-sized surface stands and the presentation scales into it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an incorrect scaling/layout state when entering fullscreen before starting emulation (e.g., fullscreen on launcher/config screen, then “Run”), which previously caused the rendered output to appear small in the top-left with the remainder black on macOS/Windows.
Changes:
- Skip
resize_for_active_panel()’srequest_inner_size()call while the window is fullscreen to avoid shrinking the drawable surface into a corner. - Add an inline rationale comment documenting the platform behavior differences (macOS/Windows affected; Linux ignores the resize request).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Going fullscreen before starting emulation broke the scaling. Launch Copperline, hit fullscreen while the configuration screen is still up, then Run, and the machine renders small in the top-left with the rest of the screen black. Starting emulation first and going fullscreen afterwards was always fine.
resize_for_active_panelasks the window for a canvas-sized inner size whenever a panel opens or closes. On a fullscreen window that doesn't resize anything, it just shrinks the drawable into a corner. It's skipped now while the window is fullscreen, so the display-sized surface stands and the presentation scales into it, which is what the working case was already doing.Tested on all three platforms: macOS and Windows both showed the bug and are fixed by this. Linux was never affected — the window manager owns fullscreen geometry there and ignores the resize request either way.
Run is the obvious way to hit this, but the same call happens on close panel, open launcher, state load and a pixel-aspect change.