🩹 fix: click trigger spam clicks

This commit is contained in:
Helloyunho 2025-07-06 20:36:54 +09:00
parent fd0b6bcaca
commit baba3c7682
No known key found for this signature in database
GPG Key ID: 6AFA210B0150BE47

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();
}
else if (event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) {
if (axisValue != 0) {
if (axisValue != 0 && !g_mousedown) {
g_mousedown = TRUE;
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;
if (InputManager()) {