Abstract fullscreen details into SDLC functions

This commit is contained in:
Cameron Gutman
2025-01-30 21:57:37 -06:00
parent 13b2b28c2f
commit a37020b974
10 changed files with 65 additions and 25 deletions

View File

@@ -270,7 +270,7 @@ void SdlInputHandler::updatePointerRegionLock()
// have full control over it and we don't touch it anymore.
if (!m_PointerRegionLockToggledByUser) {
// Lock the pointer in true full-screen mode and leave it unlocked in other modes
m_PointerRegionLockActive = (SDL_GetWindowFlags(m_Window) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN;
m_PointerRegionLockActive = SDLC_IsFullscreenExclusive(m_Window);
}
// If region lock is enabled, grab the cursor so it can't accidentally leave our window.