Remember desired cursor hide state

Fixes #511
This commit is contained in:
Cameron Gutman
2021-01-30 11:08:01 -06:00
parent 5309a02f6d
commit 1cd66419d4
4 changed files with 7 additions and 3 deletions

View File

@@ -72,7 +72,8 @@ void SdlInputHandler::performPendingSpecialKeyCombo()
"Detected show mouse combo");
if (!SDL_GetRelativeMouseMode()) {
SDL_ShowCursor(!SDL_ShowCursor(SDL_QUERY));
m_MouseCursorCapturedVisibilityState = !m_MouseCursorCapturedVisibilityState;
SDL_ShowCursor(m_MouseCursorCapturedVisibilityState);
}
else {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,