diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2017-04-25 22:58:32 +1000 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2017-05-12 22:58:58 +1000 |
commit | e6a667763079c8665affb352f209aa2f0572b0e4 (patch) | |
tree | 0ead6fe63f0a39d3d50edea2a39f9fae4b6d0f28 /video | |
parent | 18a45a42d524fe5377265485754d6413a8d14799 (diff) | |
download | mpv-e6a667763079c8665affb352f209aa2f0572b0e4.tar.bz2 mpv-e6a667763079c8665affb352f209aa2f0572b0e4.tar.xz |
w32_common: use the proper keycodes for XBUTTON1/2
mpv's mouse button numbering is based on X11, which means XBUTTON1 and 2
on Windows (the "back" and "forward" buttons) should map to MOUSE_BTN7
and 8 in mpv. MOUSE_BTN5 and 6 refer to the horizontal scroll buttons on
mouses that have them.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/w32_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 113f27409a..ce9ff771b7 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -1097,11 +1097,11 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, return TRUE; case WM_XBUTTONDOWN: handle_mouse_down(w32, - HIWORD(wParam) == 1 ? MP_MOUSE_BTN5 : MP_MOUSE_BTN6, + HIWORD(wParam) == 1 ? MP_MOUSE_BTN7 : MP_MOUSE_BTN8, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); break; case WM_XBUTTONUP: - handle_mouse_up(w32, HIWORD(wParam) == 1 ? MP_MOUSE_BTN5 : MP_MOUSE_BTN6); + handle_mouse_up(w32, HIWORD(wParam) == 1 ? MP_MOUSE_BTN7 : MP_MOUSE_BTN8); break; case WM_DISPLAYCHANGE: force_update_display_info(w32); |