Fixed mouse wheel delta on Windows
authorSam Lantinga <slouken@libsdl.org>
Mon, 11 Feb 2013 21:29:36 -0800
changeset 6861 c1c9eab3bd20
parent 6860 c16fc4e46ae5
child 6862 d189a1e771fe
Fixed mouse wheel delta on Windows
src/video/windows/SDL_windowsevents.c
--- a/src/video/windows/SDL_windowsevents.c	Mon Feb 11 21:12:14 2013 -0800
+++ b/src/video/windows/SDL_windowsevents.c	Mon Feb 11 21:29:36 2013 -0800
@@ -291,7 +291,8 @@
 
     case WM_MOUSEWHEEL:
         {
-            int motion = (short) HIWORD(wParam);
+            // FIXME: This may need to accumulate deltas up to WHEEL_DELTA
+            short motion = GET_WHEEL_DELTA_WPARAM(wParam) / WHEEL_DELTA;
 
             SDL_SendMouseWheel(data->window, 0, motion);
             break;