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: https://svn.code.sf.net/p/freeglut/code/trunk@1542 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
7caa405f57
commit
736f745cc1
@ -811,8 +811,9 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
|
|||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
{
|
{
|
||||||
SFG_Window *child_window = NULL;
|
SFG_Window *child_window = NULL;
|
||||||
int wheel_number = LOWORD( wParam );
|
int wheel_number = 0; /* Only one scroll wheel on windows */
|
||||||
short ticks = ( short )HIWORD( wParam );
|
/* int GET_KEYSTATE_WPARAM( wParam ); */
|
||||||
|
short ticks = GET_WHEEL_DELTA_WPARAM( wParam );
|
||||||
|
|
||||||
window = fghWindowUnderCursor(window);
|
window = fghWindowUnderCursor(window);
|
||||||
|
|
||||||
@ -865,6 +866,8 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
|
|||||||
|
|
||||||
fgState.Modifiers = INVALID_MODIFIERS;
|
fgState.Modifiers = INVALID_MODIFIERS;
|
||||||
}
|
}
|
||||||
|
/* Per docs, should return zero */
|
||||||
|
lRet = 0;
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user