From 4de2782312c8ea5bac5b153c5fc4e218be89798d Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 19 Apr 2026 22:01:24 +0200 Subject: [PATCH] fix: use correct event --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index a5769ad..9ed2e66 100644 --- a/main.cpp +++ b/main.cpp @@ -264,7 +264,7 @@ extern "C" int APP_MAIN(int argc, char **argv) { if (event.type == SDL_EVENT_MOUSE_MOTION) { player.y = clamp(event.motion.y - PLATE_HEIGHT / 2, 0, SCREEN_HEIGHT - PLATE_HEIGHT); } else if (event.type == SDL_EVENT_FINGER_MOTION) { - player.y = clamp(player.y + (event.motion.y * SCREEN_HEIGHT) - PLATE_HEIGHT / 2, 0, SCREEN_HEIGHT - PLATE_HEIGHT); + player.y = clamp((event.tfinger.y * SCREEN_HEIGHT) - PLATE_HEIGHT / 2, 0, SCREEN_HEIGHT - PLATE_HEIGHT); } } if (paused && event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_SPACE) {