From 1fa4bcca6a2fb0f37907cf294c2913310490b346 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 3 Jan 2018 10:43:01 -0800 Subject: [PATCH] Fixed bug 4012 - Wayland: invalid direction on mouse wheel Vladimir Invalid direction on mouse wheel Patch tested in Centos 7 + Weston --- src/video/wayland/SDL_waylandevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 7e4b782045156..3b07962b9c7de 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -337,10 +337,10 @@ pointer_handle_axis_common(struct SDL_WaylandInput *input, switch (a) { case WL_POINTER_AXIS_VERTICAL_SCROLL: x = 0; - y = (float)wl_fixed_to_double(value); + y = 0 - (float)wl_fixed_to_double(value); break; case WL_POINTER_AXIS_HORIZONTAL_SCROLL: - x = (float)wl_fixed_to_double(value); + x = 0 - (float)wl_fixed_to_double(value); y = 0; break; default: