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