X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffg_main.c;h=9acfc31c9390df39e5475a8d9dfc585481b4546d;hb=1a617fc8020eafd2f8d6d95a3f2832268fb9c93c;hp=414fa1cf073716ab7023b8e96507c1a735d360ee;hpb=56cc35535901ef071bf8acab59ba176355ee3e0e;p=freeglut diff --git a/src/fg_main.c b/src/fg_main.c index 414fa1c..9acfc31 100644 --- a/src/fg_main.c +++ b/src/fg_main.c @@ -74,13 +74,7 @@ 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 ); - } + INVOKE_WCB( *window, Reshape, ( width, height ) ); /* * Force a window redraw. In Windows at least this is only a partial @@ -317,13 +311,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) { @@ -331,6 +323,7 @@ static void fghHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e) { e->found = GL_TRUE; e->data = w; + return; } fgEnumSubWindows( w, fghHavePendingRedisplaysCallback, e ); }