From: John F. Fay Date: Sat, 9 Jun 2012 19:43:44 +0000 (+0000) Subject: Fixing the warning message when "glutGetModifiers" is called from within the special... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=7cb04a52ca8a17ec1ee7197378a34f5b3e063a9c;p=freeglut Fixing the warning message when "glutGetModifiers" is called from within the special key callback; also removing some unused key codes in the special key processing code. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1338 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index d84940f..0f7f4ae 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -241,6 +241,8 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, if ( window ) { + fgState.Modifiers = fgPlatformGetModifiers( ); + /* Checking for CTRL, ALT, and SHIFT key positions: Key Down! */ if ( !lControl && GetAsyncKeyState ( VK_LCONTROL ) ) { @@ -350,6 +352,8 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, rAlt = 0; } + + fgState.Modifiers = INVALID_MODIFIERS; } switch( uMsg ) @@ -789,12 +793,6 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, KEY( VK_RIGHT, GLUT_KEY_RIGHT ); KEY( VK_DOWN, GLUT_KEY_DOWN ); KEY( VK_INSERT, GLUT_KEY_INSERT ); - KEY( VK_LCONTROL, GLUT_KEY_CTRL_L ); - KEY( VK_RCONTROL, GLUT_KEY_CTRL_R ); - KEY( VK_LSHIFT, GLUT_KEY_SHIFT_L ); - KEY( VK_RSHIFT, GLUT_KEY_SHIFT_R ); - KEY( VK_LMENU, GLUT_KEY_ALT_L ); - KEY( VK_RMENU, GLUT_KEY_ALT_R ); case VK_DELETE: /* The delete key should be treated as an ASCII keypress: */ @@ -881,12 +879,6 @@ LRESULT CALLBACK fgPlatformWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, KEY( VK_RIGHT, GLUT_KEY_RIGHT ); KEY( VK_DOWN, GLUT_KEY_DOWN ); KEY( VK_INSERT, GLUT_KEY_INSERT ); - KEY( VK_LCONTROL, GLUT_KEY_CTRL_L ); - KEY( VK_RCONTROL, GLUT_KEY_CTRL_R ); - KEY( VK_LSHIFT, GLUT_KEY_SHIFT_L ); - KEY( VK_RSHIFT, GLUT_KEY_SHIFT_R ); - KEY( VK_LMENU, GLUT_KEY_ALT_L ); - KEY( VK_RMENU, GLUT_KEY_ALT_R ); case VK_DELETE: /* The delete key should be treated as an ASCII keypress: */