Fixing mouse wheel bug in Windows per e-mail from Ioannis Petikas dated 5/9/12 at...
authorJohn F. Fay <johnffay@nettally.com>
Sun, 10 Jun 2012 20:41:45 +0000 (20:41 +0000)
committerJohn F. Fay <johnffay@nettally.com>
Sun, 10 Jun 2012 20:41:45 +0000 (20:41 +0000)
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

index b766dd2..15e9102 100644 (file)
@@ -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,