From a1e995a2c31f17c9433383e34b32ae3b1111ea38 Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sun, 10 Jun 2012 20:41:45 +0000 Subject: [PATCH] Fixing mouse wheel bug in Windows per e-mail from Ioannis Petikas dated 5/9/12 at 1:02 PM. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1341 7f0cb862-5218-0410-a997-914c9d46530a --- src/mswin/fg_main_mswin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index b766dd2..15e9102 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -689,7 +689,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, /* * XXX Should use WHEEL_DELTA instead of 120 */ - if ( abs ( fgState.MouseWheelTicks ) > 120 ) + if ( abs ( fgState.MouseWheelTicks ) >= 120 ) { int direction = ( fgState.MouseWheelTicks > 0 ) ? 1 : -1; @@ -703,7 +703,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, /* * XXX Should use WHEEL_DELTA instead of 120 */ - while( abs ( fgState.MouseWheelTicks ) > 120 ) + while( abs ( fgState.MouseWheelTicks ) >= 120 ) { if( FETCH_WCB( *window, MouseWheel ) ) INVOKE_WCB( *window, MouseWheel, -- 1.7.10.4