From ef33439e0b2305186f700bfd80954a09a64df8ab Mon Sep 17 00:00:00 2001 From: Valerio Date: Sun, 28 Sep 2025 12:05:49 +0200 Subject: [PATCH] touchpad events, try sdl emulation --- src/unix/unix.c | 2 ++ src/unix/unix_sdl.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/unix/unix.c b/src/unix/unix.c index a0820cba3..15d6b9b7e 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -1378,6 +1378,7 @@ main(int argc, char **argv) /* Touch events */ /* SDL_FINGERDOWN, */ /* SDL_FINGERUP, */ + /* case SDL_FINGERMOTION: { // See SDL_TouchFingerEvent @@ -1388,6 +1389,7 @@ main(int argc, char **argv) } break; } + */ case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: diff --git a/src/unix/unix_sdl.c b/src/unix/unix_sdl.c index 26115deff..806f71918 100644 --- a/src/unix/unix_sdl.c +++ b/src/unix/unix_sdl.c @@ -419,6 +419,10 @@ sdl_init_common(int flags) return (0); } + // Ensure mouse and touchpads behaves the same for us + SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "1"); + SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "1"); + if (flags & RENDERER_HARDWARE) { if (flags & RENDERER_OPENGL) { SDL_SetHint(SDL_HINT_RENDER_DRIVER, "OpenGL");