From 019859d98079c0cf0c287e54d515b0ccb4004d52 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 12 Nov 2018 19:38:50 +0100 Subject: Fix 697783: Invert mouse wheel mapping in mupdf-win32. A positive wParam value maps to button rotated forward, away from the user, which is equivalent to button 4 in X11. --- platform/x11/win_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'platform/x11/win_main.c') diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index 3725051f..9afd2d06 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -1167,13 +1167,13 @@ viewproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSEWHEEL: if ((signed short)HIWORD(wParam) <= 0) { - handlemouse(oldx, oldy, 4, 1); - handlemouse(oldx, oldy, 4, -1); + handlemouse(oldx, oldy, 5, 1); + handlemouse(oldx, oldy, 5, -1); } else { - handlemouse(oldx, oldy, 5, 1); - handlemouse(oldx, oldy, 5, -1); + handlemouse(oldx, oldy, 4, 1); + handlemouse(oldx, oldy, 4, -1); } return 0; -- cgit v1.2.3