From 93011e4f079bbfdb796c7b7f524f247956cc4830 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Fri, 1 Mar 2013 15:42:26 +0000 Subject: [PATCH] fixed up handling of WM_MOUSEWHEEL, low order of wParam is not the mouse wheel number, but indicates which virtual keys are pressed during the scroll wheel motion git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1542 7f0cb862-5218-0410-a997-914c9d46530a --- src/mswin/fg_main_mswin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index 85492f7..656ae51 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -811,8 +811,9 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR case WM_MOUSEWHEEL: { SFG_Window *child_window = NULL; - int wheel_number = LOWORD( wParam ); - short ticks = ( short )HIWORD( wParam ); + int wheel_number = 0; /* Only one scroll wheel on windows */ + /* int GET_KEYSTATE_WPARAM( wParam ); */ + short ticks = GET_WHEEL_DELTA_WPARAM( wParam ); window = fghWindowUnderCursor(window); @@ -865,6 +866,8 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR fgState.Modifiers = INVALID_MODIFIERS; } + /* Per docs, should return zero */ + lRet = 0; } break ; -- 1.7.10.4