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:
dcnieho 2013-03-01 15:42:26 +00:00
parent 7caa405f57
commit 736f745cc1

View File

@ -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 ;