From 515b7e93b5af3dc552a7974ed7245a0e0456ae2a Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Fri, 27 Aug 2021 17:02:07 +0300 Subject: [PATCH] Fix horizontal wheel scroll direction of X11. --- src/video/x11/SDL_x11events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index f91131305..e14f8d858 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -1228,7 +1228,7 @@ X11_DispatchEvent(_THIS, XEvent *xevent) printf("window %p: ButtonPress (X11 button = %d)\n", data, xevent->xbutton.button); #endif if (X11_IsWheelEvent(display,xevent,&xticks, &yticks)) { - SDL_SendMouseWheel(data->window, 0, (float) xticks, (float) yticks, SDL_MOUSEWHEEL_NORMAL); + SDL_SendMouseWheel(data->window, 0, (float) -xticks, (float) yticks, SDL_MOUSEWHEEL_NORMAL); } else { SDL_bool ignore_click = SDL_FALSE; int button = xevent->xbutton.button;