Revert "Only use SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0 for native notched resolution"

Users want to control when the notch is and is not included for display scaling.

Fixes #1301

This reverts commit e25d9b0da200154276fd0b8f44a0f7419420275f.
This commit is contained in:
Cameron Gutman 2024-06-09 15:42:39 -05:00
parent 17af71fe7a
commit b59de38e0b

View File

@ -570,7 +570,7 @@ bool Session::initialize()
// (notched or notchless), override the fullscreen mode to ensure it works as expected. // (notched or notchless), override the fullscreen mode to ensure it works as expected.
// - SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0 will place the video underneath the notch // - SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=0 will place the video underneath the notch
// - SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=1 will place the video below the notch // - SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES=1 will place the video below the notch
bool shouldUseFullScreenSpaces = true; bool shouldUseFullScreenSpaces = m_Preferences->windowMode != StreamingPreferences::WM_FULLSCREEN;
SDL_DisplayMode desktopMode; SDL_DisplayMode desktopMode;
SDL_Rect safeArea; SDL_Rect safeArea;
for (int displayIndex = 0; StreamUtils::getNativeDesktopMode(displayIndex, &desktopMode, &safeArea); displayIndex++) { for (int displayIndex = 0; StreamUtils::getNativeDesktopMode(displayIndex, &desktopMode, &safeArea); displayIndex++) {
@ -583,6 +583,12 @@ bool Session::initialize()
shouldUseFullScreenSpaces = false; shouldUseFullScreenSpaces = false;
break; break;
} }
else if (m_Preferences->width == safeArea.w && m_Preferences->height == safeArea.h) {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Overriding default fullscreen mode for native safe area resolution");
shouldUseFullScreenSpaces = true;
break;
}
} }
} }