mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
window: fix hiding mouse cursor when regaining focus in windowed mode
This commit is contained in:
parent
1ccd8b20e5
commit
aa59eae8c8
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue