mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-11-01 12:06:41 +01:00
window: fix hiding mouse cursor when regaining focus in windowed mode
This commit is contained in:
1 parent
1ccd8b20e5
commit
aa59eae8c8
1 file changed
+6
-1
@@ -84,9 +84,14 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
{
|
||||
Window::s_isFocused = true;
|
||||
SDL_ShowCursor(Window::IsFullscreen() && Window::s_isFullscreenCursorVisible ? SDL_ENABLE : SDL_DISABLE);
|
||||
|
||||
if (Window::IsFullscreen())
|
||||
SDL_ShowCursor(Window::s_isFullscreenCursorVisible ? SDL_ENABLE : SDL_DISABLE);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL_WINDOWEVENT_RESTORED:
|
||||
Config::WindowState = EWindowState::Normal;
|
||||
|
||||
Reference in new issue
Block a user