mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-05-13 06:18:52 -05:00
game_window: fix mouse cursor flickering after controller input
This commit is contained in:
@@ -239,12 +239,16 @@ int HID_OnSDLEvent(void*, SDL_Event* event)
|
||||
if (event->type == SDL_CONTROLLERAXISMOTION)
|
||||
{
|
||||
if (abs(event->caxis.value) > 8000)
|
||||
{
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
SetControllerInputDevice(controller);
|
||||
}
|
||||
|
||||
controller->PollAxis();
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
SetControllerInputDevice(controller);
|
||||
|
||||
controller->Poll();
|
||||
@@ -261,8 +265,14 @@ int HID_OnSDLEvent(void*, SDL_Event* event)
|
||||
case SDL_MOUSEMOTION:
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
{
|
||||
if (!GameWindow::IsFullscreen() || GameWindow::s_isFullscreenCursorVisible)
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
|
||||
hid::g_inputDevice = hid::EInputDevice::Mouse;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL_WINDOWEVENT:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user