1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-19 12:28:07 +00:00

one more fix to touch control

This commit is contained in:
Zeno Rogue
2025-12-11 22:26:22 +01:00
parent 1e0d4de209
commit a1e7ac289d

View File

@@ -1287,6 +1287,15 @@ EX void handle_event(SDL_Event& ev) {
if(ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN && ev.button.which == 255) return;
#endif
if(ev.button.x != mousex || ev.button.y != mousey) {
mousex = ev.button.x;
mousey = ev.button.y;
just_refreshing = true;
reset_handlers();
screens.back()();
just_refreshing = false;
}
mousepressed = ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN;
if(mousepressed) flashMessages();
mousing = true;