window: always hide mouse cursor

The options menu doesn't accept mouse input, so there's not really any point to showing the cursor at all.
This commit is contained in:
Hyper 2024-11-21 05:11:24 +00:00
parent 5b5272b17a
commit dc40950343

View file

@ -81,7 +81,7 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
case SDL_WINDOWEVENT_FOCUS_GAINED: case SDL_WINDOWEVENT_FOCUS_GAINED:
Window::s_isFocused = true; Window::s_isFocused = true;
SDL_ShowCursor(Window::IsFullscreen() ? SDL_DISABLE : SDL_ENABLE); SDL_ShowCursor(SDL_DISABLE);
break; break;
case SDL_WINDOWEVENT_RESTORED: case SDL_WINDOWEVENT_RESTORED:
@ -150,9 +150,6 @@ void Window::Init()
s_pWindow = SDL_CreateWindow("SWA", s_x, s_y, s_width, s_height, GetWindowFlags()); s_pWindow = SDL_CreateWindow("SWA", s_x, s_y, s_width, s_height, GetWindowFlags());
if (IsFullscreen())
SDL_ShowCursor(SDL_DISABLE);
SetIcon(); SetIcon();
SetTitle(); SetTitle();
SDL_SetWindowMinimumSize(s_pWindow, 640, 480); SDL_SetWindowMinimumSize(s_pWindow, 640, 480);