From 10dda34d4d2e5604302bb4b1f97bb564e80b97d5 Mon Sep 17 00:00:00 2001 From: zongor Date: Fri, 13 Feb 2026 22:30:51 -0800 Subject: [PATCH] fix touch event --- src/arch/emscripten/main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/arch/emscripten/main.c b/src/arch/emscripten/main.c index e22622c..3f5b882 100644 --- a/src/arch/emscripten/main.c +++ b/src/arch/emscripten/main.c @@ -76,12 +76,10 @@ void mainloop() { mouse_data.x = (int)x; mouse_data.y = (int)y; - if (event.tfinger.fingerId == 0) { - if (event.type == SDL_FINGERDOWN || event.type == SDL_FINGERMOTION) { - mouse_data.btn1 = 1; - } else if (event.type == SDL_FINGERUP) { - mouse_data.btn1 = 0; - } + if (event.type == SDL_FINGERDOWN || event.type == SDL_FINGERMOTION) { + mouse_data.btn1 = 1; + } else if (event.type == SDL_FINGERUP) { + mouse_data.btn1 = 0; } break; }