/* 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 )
{
{
SFG_Window* window;
PAINTSTRUCT ps;
- LONG lRet = 1;
+ LRESULT lRet = 1;
FREEGLUT_INTERNAL_ERROR_EXIT_IF_NOT_INITIALISED ( "Event Handler" ) ;
}
window->State.NeedToResize = GL_TRUE;
- window->State.Width = fgState.Size.X;
- window->State.Height = fgState.Size.Y;
+ if( ( window->State.Width < 0 ) || ( window->State.Height < 0 ) )
+ {
+ SFG_Window *current_window = fgStructure.CurrentWindow;
+
+ fgSetWindow( window );
+ window->State.Width = glutGet( GLUT_WINDOW_WIDTH );
+ window->State.Height = glutGet( GLUT_WINDOW_HEIGHT );
+ fgSetWindow( current_window );
+ }
ReleaseDC( window->Window.Handle, window->Window.Device );
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,