mirror of
https://github.com/hedge-dev/UnleashedRecomp
synced 2026-09-04 19:01:26 -04: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;
|
break;
|
||||||
|
|
||||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||||
|
{
|
||||||
Window::s_isFocused = true;
|
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;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case SDL_WINDOWEVENT_RESTORED:
|
case SDL_WINDOWEVENT_RESTORED:
|
||||||
Config::WindowState = EWindowState::Normal;
|
Config::WindowState = EWindowState::Normal;
|
||||||
|
|||||||
Reference in New Issue
Block a user