Skip to content

Instant fullscreen via video options screen #477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chaimleib
Copy link
Contributor

@chaimleib chaimleib commented Jan 8, 2024

Clicking the "Fullscreen" checkbox in Options > Video now instantly toggles fullscreen mode, rather than waiting for the next game launch.

In macOS, the green fullscreen button in the window titlebar has the same effect.

In Linux, alt-Enter continues to toggle fullscreen as before.

I tested this using both macOS Sonoma 14.2.1 and Asahi Fedora Remix on a 16" MBP M1 Max.

@chaimleib
Copy link
Contributor Author

chaimleib commented Jan 8, 2024

Problem on Linux: when starting in windowed mode, the pixel doubling (especially in the fonts) is fuzzy, and scrolling text flickers. Toggling fullscreen back and forth fixes the fuzziness, but also makes it tiny.

Screenshot_20240108_151527

@chaimleib
Copy link
Contributor Author

I think the fuzziness comes from fractional screen scaling. I played around with the OS display scale factor (150%, then 200%, then 100%) and fullscreen, and the problem disappeared. Now it's always tiny and not fuzzy on Linux. I can't reproduce the fuzziness anymore.

In another PR, it would be nice if the graphics were pixel doubled, but fonts rendered at 2x on hi-res displays.

virtual InputMode input_mode() const = 0;
virtual int scale() const = 0;
virtual Size screen_size() const = 0;
virtual void set_fullscreen(const bool on) = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const isn’t meaningful in this context (function declaration argument).

I believe you can keep it in the function definition if you really want, but please remove it from the declarations.

@chaimleib
Copy link
Contributor Author

Bug: When alt-Enter is used to toggle fullscreen, using the video options checkbox afterwards during the same launch will not apply the change until next launch.

@sfiera
Copy link
Member

sfiera commented Mar 26, 2024

Sorry, I forgot what the status of this PR was. There was the matter of the function signature change and the bug you mentioned above. Were you aiming to merge this as-is or to refine further?

@chaimleib
Copy link
Contributor Author

I don't think this PR is ready to merge, because the different fullscreen methods can get out of sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants