X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_main.c;h=2bc8435c819488ea20b7a4bde464efe239af8fa1;hb=fac29bb829c0a2103cd947f497efe1cc9e75b4c4;hp=fd94e0efd0b747e1884c3e72013865df68bfb2fc;hpb=f50219f3ee035143ce9a056e4362959bef5c91cc;p=freeglut diff --git a/src/fg_main.c b/src/fg_main.c index fd94e0e..2bc8435 100644 --- a/src/fg_main.c +++ b/src/fg_main.c @@ -74,14 +74,6 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height ) fgPlatformReshapeWindow ( window, width, height ); - if( FETCH_WCB( *window, Reshape ) ) - INVOKE_WCB( *window, Reshape, ( width, height ) ); - else - { - fgSetWindow( window ); - glViewport( 0, 0, width, height ); - } - /* * Force a window redraw. In Windows at least this is only a partial * solution: if the window is increasing in size in either dimension, @@ -221,6 +213,7 @@ static void fghCheckTimers( void ) SFG_Timer *timer = fgState.Timers.First; if( timer->TriggerTime > checkTime ) + /* XXX: are timers always sorted by triggerTime? If not, this and fghNextTimer are wrong */ break; fgListRemove( &fgState.Timers, &timer->Node ); @@ -316,13 +309,11 @@ void fgWarning( const char *fmt, ... ) /* - * Indicates whether Joystick events are being used by ANY window. + * Indicates whether a redisplay is pending for ANY window. * * The current mechanism is to walk all of the windows and ask if - * there is a joystick callback. We have a short-circuit early - * return if we find any joystick handler registered. - * - * + * a redisplay is pending. We have a short-circuit early + * return if we find any. */ static void fghHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e) { @@ -330,6 +321,7 @@ static void fghHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e) { e->found = GL_TRUE; e->data = w; + return; } fgEnumSubWindows( w, fghHavePendingRedisplaysCallback, e ); }