Allow the cursor lock toggle to work in full-screen mode

Fixes #793
This commit is contained in:
Cameron Gutman 2022-05-19 19:14:55 -05:00
commit 56f184393f
5 changed files with 24 additions and 31 deletions

View file

@ -130,6 +130,12 @@ void SdlInputHandler::performSpecialKeyCombo(KeyCombo combo)
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Detected pointer region lock toggle combo");
m_PointerRegionLockActive = !m_PointerRegionLockActive;
// Remember that the user changed this manually, so we don't mess with it anymore
// during windowed <-> full-screen transitions.
m_PointerRegionLockToggledByUser = true;
// Apply the new region lock
updatePointerRegionLock();
break;