Explorar el Código

xinput2: correct horizontal touchpad scrolling direction

This fixes testmouse so when fingers move left the green line moves
left.

(cherry picked from commit 5e0f721fd4dd98268cdcfcffbc99cce75fae3907)
David Vanderson hace 2 días
padre
commit
d6f7b314b3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/video/x11/SDL_x11xinput2.c

+ 1 - 1
src/video/x11/SDL_x11xinput2.c

@@ -180,7 +180,7 @@ static void xinput2_parse_scrollable_valuators(const XIDeviceEvent *xev)
                             const double y = info->scroll_type == XIScrollTypeVertical ? delta : 0;
 
                             SDL_Mouse *mouse = SDL_GetMouse();
-                            SDL_SendMouseWheel(xev->time, mouse->focus, (SDL_MouseID)xev->sourceid, (float)x, (float)y, SDL_MOUSEWHEEL_NORMAL);
+                            SDL_SendMouseWheel(xev->time, mouse->focus, (SDL_MouseID)xev->sourceid, (float)-x, (float)y, SDL_MOUSEWHEEL_NORMAL);
                         }
                         info->prev_value = current_val;
                         info->prev_value_valid = true;