From b978fe6a3883f615f5530bf62cada0ccfce5fea1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 11 Dec 2025 21:06:16 +0100 Subject: [PATCH] ignore the extra event on touchpad --- control.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/control.cpp b/control.cpp index dbfa3f23..6196979b 100644 --- a/control.cpp +++ b/control.cpp @@ -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;