mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-31 00:50:00 -06:00
window: fix hiding mouse cursor when regaining focus in windowed mode
This commit is contained in:
@@ -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