now using WHEEL_DELTA for mouse wheel processing, instead of a magic
number git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1463 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
2359c3cc11
commit
74b361d347
@ -661,10 +661,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
short ticks = ( short )HIWORD( wParam );
|
short ticks = ( short )HIWORD( wParam );
|
||||||
fgState.MouseWheelTicks += ticks;
|
fgState.MouseWheelTicks += ticks;
|
||||||
|
|
||||||
/*
|
if ( abs ( fgState.MouseWheelTicks ) >= WHEEL_DELTA )
|
||||||
* XXX Should use WHEEL_DELTA instead of 120
|
|
||||||
*/
|
|
||||||
if ( abs ( fgState.MouseWheelTicks ) >= 120 )
|
|
||||||
{
|
{
|
||||||
int direction = ( fgState.MouseWheelTicks > 0 ) ? 1 : -1;
|
int direction = ( fgState.MouseWheelTicks > 0 ) ? 1 : -1;
|
||||||
|
|
||||||
@ -675,10 +672,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
fgSetWindow( window );
|
fgSetWindow( window );
|
||||||
fgState.Modifiers = fgPlatformGetModifiers( );
|
fgState.Modifiers = fgPlatformGetModifiers( );
|
||||||
|
|
||||||
/*
|
while( abs ( fgState.MouseWheelTicks ) >= WHEEL_DELTA )
|
||||||
* XXX Should use WHEEL_DELTA instead of 120
|
|
||||||
*/
|
|
||||||
while( abs ( fgState.MouseWheelTicks ) >= 120 )
|
|
||||||
{
|
{
|
||||||
if( FETCH_WCB( *window, MouseWheel ) )
|
if( FETCH_WCB( *window, MouseWheel ) )
|
||||||
INVOKE_WCB( *window, MouseWheel,
|
INVOKE_WCB( *window, MouseWheel,
|
||||||
@ -710,10 +704,7 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
fgState.MouseWheelTicks -= WHEEL_DELTA * direction;
|
||||||
* XXX Should use WHEEL_DELTA instead of 120
|
|
||||||
*/
|
|
||||||
fgState.MouseWheelTicks -= 120 * direction;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fgState.Modifiers = INVALID_MODIFIERS;
|
fgState.Modifiers = INVALID_MODIFIERS;
|
||||||
|
Reference in New Issue
Block a user