1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-01-20 18:09:53 +00:00

ignore the extra event on touchpad

This commit is contained in:
Zeno Rogue
2025-12-11 21:06:16 +01:00
parent 964e2f20f6
commit b978fe6a38

View File

@@ -1281,6 +1281,12 @@ EX void handle_event(SDL_Event& ev) {
bool rollchange = (cmode & sm::OVERVIEW) && getcstat >= 2000 && cheater;
if(ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN || ev.type == SDL_EVENT_MOUSE_BUTTON_UP SDL12(, || ev.type == SDL_EVENT_MOUSE_WHEEL)) {
#if SDLVER == 1
// ignore the extra event on touchpad
if(ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN && ev.button.which == 255) return;
#endif
mousepressed = ev.type == SDL_EVENT_MOUSE_BUTTON_DOWN;
if(mousepressed) flashMessages();
mousing = true;