X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_main.c;h=8aed70194b8efe04ca61f1b717b69c6d079399c2;hb=30971e75717f3d7b826714fbbb1171dfaf9164cf;hp=44876f2842f6153a03ac0341dec906c472407770;hpb=fe573d6af98de430357a7321cd50f5e92e9a2aab;p=freeglut diff --git a/src/freeglut_main.c b/src/freeglut_main.c index 44876f2..8aed701 100644 --- a/src/freeglut_main.c +++ b/src/freeglut_main.c @@ -1290,7 +1290,10 @@ void FGAPIENTRY glutMainLoopEvent( void ) /* Cease processing this event if it is auto repeated */ if (window->State.KeyRepeating) + { + if (event.type == KeyPress) window->State.KeyRepeating = GL_FALSE; break; + } if( event.type == KeyPress ) { @@ -1545,7 +1548,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, { SFG_Window* window; PAINTSTRUCT ps; - LONG lRet = 1; + LRESULT lRet = 1; FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Event Handler" ) ; @@ -2085,7 +2088,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, GetKeyboardState( state ); - if( ToAscii( wParam, 0, state, code, 0 ) == 1 ) + if( ToAscii( (UINT)wParam, 0, state, code, 0 ) == 1 ) wParam=code[ 0 ]; INVOKE_WCB( *window, KeyboardUp,