libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.41k stars 1.75k forks source link

Fullscreen-desktop window squashed on Macbook with camera notch #10453

Open slouken opened 1 month ago

slouken commented 1 month ago

When going into a fullscreen space on macOS, the window is placed below the notch on recent Macbooks with camera notches. Ideally we want the window to extend to the entire screen and the safe area to be updated to reflect the notch.

slime73 commented 1 month ago

Recent mac laptops that have the notch have a non-standard aspect ratio when it's included - 16:10 without it, and ~15.4:10 with it. I wonder if that combined with the notch still preventing visibility for part of that area would cause surprises for certain apps? Maybe it makes sense to have notch-aware fullscreen opt-in via a hint on macOS?

That being said, I also wonder if there's a performance penalty when a game's window doesn't include the notch area in fullscreen.

maia-s commented 1 month ago

This would be a good option to have, but in my opinion it's important that it's only an option, and not enabled by default. Ideally the game could indicate that it's designed with the notch in mind to SDL, and either always enable it if that's what the game designers want, or provide an option to the user to draw above it or not. SDL shouldn't decide on its own to draw above the notch.

Most games aren't designed to have a chunk of the top middle part of the screen invisible, and it has an impact on aesthetics, too. When I play games in fullscreen on my laptop screen I often have to open the app bundle and select the compatibility option to scale it below the notch to make the game work right. It usually looks a lot better that way, too. Newer games disable drawing above the notch on their own.