Fixed bug 4012 - Wayland: invalid direction on mouse wheel
authorSam Lantinga <slouken@libsdl.org>
Wed, 03 Jan 2018 10:43:01 -0800
changeset 11813ea7c4b476853
parent 11812 a9a3023d29f9
child 11814 0d9b386fefb7
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
     1.1 --- a/src/video/wayland/SDL_waylandevents.c	Wed Jan 03 10:07:27 2018 -0800
     1.2 +++ b/src/video/wayland/SDL_waylandevents.c	Wed Jan 03 10:43:01 2018 -0800
     1.3 @@ -337,10 +337,10 @@
     1.4          switch (a) {
     1.5              case WL_POINTER_AXIS_VERTICAL_SCROLL:
     1.6                  x = 0;
     1.7 -                y = (float)wl_fixed_to_double(value);
     1.8 +                y = 0 - (float)wl_fixed_to_double(value);
     1.9                  break;
    1.10              case WL_POINTER_AXIS_HORIZONTAL_SCROLL:
    1.11 -                x = (float)wl_fixed_to_double(value);
    1.12 +                x = 0 - (float)wl_fixed_to_double(value);
    1.13                  y = 0;
    1.14                  break;
    1.15              default: