From 1897e7e46186c5aa11700a72cb3331c1aabdb360 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Wed, 6 Mar 2013 03:51:01 +0000 Subject: [PATCH] fghHavePendingRedisplaysCallback: docs fixed up, and return without checking subwindows first if we have already found a window with pending redisplay git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1556 7f0cb862-5218-0410-a997-914c9d46530a --- src/fg_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fg_main.c b/src/fg_main.c index 414fa1c..f6a94a6 100644 --- a/src/fg_main.c +++ b/src/fg_main.c @@ -317,13 +317,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 +329,7 @@ static void fghHavePendingRedisplaysCallback( SFG_Window* w, SFG_Enumerator* e) { e->found = GL_TRUE; e->data = w; + return; } fgEnumSubWindows( w, fghHavePendingRedisplaysCallback, e ); } -- 1.7.10.4