mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-20 14:11:16 +00:00
🩹 fix: touch screens go beep and done (#573)
This commit is contained in:
parent
078b1b52d0
commit
96f60cb683
@ -625,6 +625,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_lastMouseX = event->motion.x;
|
g_lastMouseX = event->motion.x;
|
||||||
g_lastMouseY = event->motion.y;
|
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 x = SDL_clamp(event->tfinger.x, 0, 1) * 640;
|
||||||
float y = SDL_clamp(event->tfinger.y, 0, 1) * 480;
|
float y = SDL_clamp(event->tfinger.y, 0, 1) * 480;
|
||||||
|
|
||||||
g_lastMouseX = x;
|
|
||||||
g_lastMouseY = y;
|
|
||||||
|
|
||||||
if (InputManager()) {
|
if (InputManager()) {
|
||||||
InputManager()->QueueEvent(c_notificationMouseMove, LegoEventNotificationParam::c_lButtonState, x, y, 0);
|
InputManager()->QueueEvent(c_notificationMouseMove, LegoEventNotificationParam::c_lButtonState, x, y, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_lastMouseX = x;
|
||||||
|
g_lastMouseY = y;
|
||||||
|
|
||||||
SDL_HideCursor();
|
SDL_HideCursor();
|
||||||
g_isle->SetDrawCursor(FALSE);
|
g_isle->SetDrawCursor(FALSE);
|
||||||
if (VideoManager()) {
|
if (VideoManager()) {
|
||||||
@ -687,6 +688,15 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event)
|
|||||||
if (InputManager()) {
|
if (InputManager()) {
|
||||||
InputManager()->QueueEvent(c_notificationButtonDown, LegoEventNotificationParam::c_lButtonState, x, y, 0);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_EVENT_MOUSE_BUTTON_UP:
|
case SDL_EVENT_MOUSE_BUTTON_UP:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user