From df05d5eff45d15eff45cdae9f65e2ab4c3fd8e07 Mon Sep 17 00:00:00 2001
From: Cameron Cawley <[EMAIL REDACTED]>
Date: Tue, 28 Nov 2023 22:15:18 +0000
Subject: [PATCH] Fix scroll wheel handling in testmouse
---
test/testmouse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/testmouse.c b/test/testmouse.c
index b7852e7442d7..18efbc0eb67b 100644
--- a/test/testmouse.c
+++ b/test/testmouse.c
@@ -125,10 +125,10 @@ static void loop(void *arg)
/* "positive to the right and negative to the left" */
wheel_x += event.wheel.x * 10.0f;
}
- if (event.wheel.x != 0.0f) {
+ if (event.wheel.y != 0.0f) {
wheel_y_active = SDL_TRUE;
/* "positive away from the user and negative towards the user" */
- wheel_y -= event.wheel.x * 10.0f;
+ wheel_y -= event.wheel.y * 10.0f;
}
break;