🩹 fix: click trigger spam clicks (#537)

This commit is contained in:
Helloyunho 2025-07-06 22:22:21 +09:00 committed by GitHub
parent fd0b6bcaca
commit dbff98f354
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -554,7 +554,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
g_lastJoystickMouseY = ((MxFloat) axisValue) / SDL_JOYSTICK_AXIS_MAX * g_isle->GetCursorSensitivity(); g_lastJoystickMouseY = ((MxFloat) axisValue) / SDL_JOYSTICK_AXIS_MAX * g_isle->GetCursorSensitivity();
} }
else if (event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) { else if (event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) {
if (axisValue != 0) { if (axisValue != 0 && !g_mousedown) {
g_mousedown = TRUE; g_mousedown = TRUE;
if (InputManager()) { if (InputManager()) {
@ -567,7 +567,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
); );
} }
} }
else { else if (axisValue == 0 && g_mousedown) {
g_mousedown = FALSE; g_mousedown = FALSE;
if (InputManager()) { if (InputManager()) {