-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
GRAPHICS3D: Use SDL_WINDOW_FULLSCREEN_DESKTOP for fullscreen in 3D games #3864
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
Conversation
…mes too. On macOS this has some benefits: * It's notch-aware * It's possible to switch spaces to/from such a window (which is not possible for SDL_WINDOW_FULLSCREEN) * It's a lot more similar to the result you get by clicking the green Zoom/fullscreen button
That's interesting, I remember having a few issues with entering and leaving fullscreen mode on Ubuntu as well regarding 3D games. So with this change, all 3D games should behave exactly like 2D games, right? |
Does this work as expected for Grim Fandango and Escape from Monkey Island on systems without framebuffer support? |
I think the change makes sense. As far as I know the main case where using the old But it might indeed be a good idea to check a game with each 3D engine to make sure they are all working properly with this change. I am also wondering if the Nintendo Switch hack a few lines above the change is still needed with that change. |
Any updates on this? |
I can't test this on Switch, but I can test on each of the 3D engines at least. |
Hmm interesting, a quick test with Grim Demo revealed a thing I hadn't spotted earlier: I can alt-enter back and forth perfectly fine, and I can press the green button to go fullscreen and back, HOWEVER, if I enter fullscreen with the green button, then alt-enter will rescale the viewport to be 640x480-ish in the lower left corner, but remain fullscreen. And: If I enter fullscreen with alt-enter, then I won't have the green-button available to exit, the only way to exit (except switching spaces), is to alt-enter back out. On top of this there's a single frame drawn stretching the game across the entire screen (ignoring aspect), before it pops back to the right aspect. Comparably, the old behaviour: green-button fullscreen will yield the same result as above, including the aspect issues, however if you press alt-enter in this state, ScummVM will segfault:
So overall I think this may require a bit more research, and/or discussion before we settle on a choice, the lack of notch-awareness is suboptimal on the new MacBooks, but the transition is suboptimal currently, and the notch-aware behaviour is available through the green-button. |
This should be a good change on Windows as well, recent Windows versions have changed fullscreen behavior in a way that there isn't really any advantage to using exclusive fullscreen any more. |
On Linux, I don't see any difference between EDIT: |
I wonder, what is the behaviour in 2024? |
PR #6651 will make this PR irrelevant. |
PR #6651 has been merged now, so this can be closed |
This is a tiny change, code wise, but it may need a bit of testing/discussion nevertheless, thus pushing as a PR.
On macOS using SDL_WINDOW_FULLSCREEN leads to a fullscreen scenario where CMD-TAB and other ways to switch applications are disabled, which is inconvenient. This mode is also unaware of the notch that was added to the latest series of MacBooks, thus rendering in that part of the screen, and losing the bit that is covered by the notch.
If we instead use SDL_WINDOW_FULLSCREEN_DESKTOP (like we already do for 2D titles), both of these problems go away.
This resolves https://bugs.scummvm.org/ticket/13454
And since the new behaviour is seemingly the same as clicking the green window button (minus being able to see the window border in fullscreen), this also makes https://bugs.scummvm.org/ticket/13453 a non-issue.