🩹 fix: touch screens go beep and done (#573)

This commit is contained in:
Helloyunho 2025-07-10 19:43:46 +09:00 committed by GitHub
parent 078b1b52d0
commit 96f60cb683
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -625,6 +625,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
0
);
}
g_lastMouseX = event->motion.x;
g_lastMouseY = event->motion.y;
@ -643,13 +644,13 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
float x = SDL_clamp(event->tfinger.x, 0, 1) * 640;
float y = SDL_clamp(event->tfinger.y, 0, 1) * 480;
g_lastMouseX = x;
g_lastMouseY = y;
if (InputManager()) {
InputManager()->QueueEvent(c_notificationMouseMove, LegoEventNotificationParam::c_lButtonState, x, y, 0);
}
g_lastMouseX = x;
g_lastMouseY = y;
SDL_HideCursor();
g_isle->SetDrawCursor(FALSE);
if (VideoManager()) {
@ -687,6 +688,15 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
if (InputManager()) {
InputManager()->QueueEvent(c_notificationButtonDown, LegoEventNotificationParam::c_lButtonState, x, y, 0);
}
g_lastMouseX = x;
g_lastMouseY = y;
SDL_HideCursor();
g_isle->SetDrawCursor(FALSE);
if (VideoManager()) {
VideoManager()->SetCursorBitmap(NULL);
}
break;
}
case SDL_EVENT_MOUSE_BUTTON_UP: