Skip to content
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

GRAPHICS3D: Use SDL_WINDOW_FULLSCREEN_DESKTOP for fullscreen in 3D games #3864

wants to merge 1 commit into
base: master
Choose a base branch


Copy link

@somaen somaen commented May 7, 2022

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

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 a non-issue.

…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
Copy link

@lotharsm lotharsm commented May 7, 2022

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?

Copy link

@ccawley2011 ccawley2011 commented May 7, 2022

Does this work as expected for Grim Fandango and Escape from Monkey Island on systems without framebuffer support?

Copy link

@criezy criezy commented May 16, 2022

I think the change makes sense. As far as I know the main case where using the old SDL_WINDOW_FULLSCREEN is interesting is when using ScummVM on a retro-system with a CRT monitor that natively supports multiple resolutions. But that's an edge case, and for the 2D SDL Surface and OpenGL graphics backend we already switched to using SDL_WINDOW_FULLSCREEN_DESKTOP.

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.

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