[Commits] SDL: Fixed bug 4012 - Wayland: invalid direction on mouse wheel

libsdl.org revision control commits-owner at libsdl.org
Wed Jan 3 10:36:01 PST 2018


details:   https://hg.libsdl.org/SDL/rev/ea7c4b476853
changeset: 11813:ea7c4b476853
user:      Sam Lantinga <slouken at libsdl.org>
date:      Wed Jan 03 10:43:01 2018 -0800
description:
Fixed bug 4012 - Wayland: invalid direction on mouse wheel

Vladimir

Invalid direction on mouse wheel

Patch tested in Centos 7 + Weston

diffstat:

 src/video/wayland/SDL_waylandevents.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r a9a3023d29f9 -r ea7c4b476853 src/video/wayland/SDL_waylandevents.c
--- a/src/video/wayland/SDL_waylandevents.c	Wed Jan 03 10:07:27 2018 -0800
+++ b/src/video/wayland/SDL_waylandevents.c	Wed Jan 03 10:43:01 2018 -0800
@@ -337,10 +337,10 @@
         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:


More information about the commits mailing list