mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-15 21:18:43 +02:00
xinput2: correct horizontal touchpad scrolling direction
This fixes testmouse so when fingers move left the green line moves
left.
(cherry picked from commit 5e0f721fd4)
This commit is contained in:
committed by
Frank Praznik
parent
88acac053a
commit
d6f7b314b3
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user