From 59ae6d2a567a3a0151bed99dc4b4dffa18b22e85 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Tue, 5 Mar 2013 17:08:32 +0000 Subject: [PATCH] fghSleepForEvents immediately returns if we have an idle callback, so simply don't call the function at all if we just processed the idle callback git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1553 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/fg_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freeglut/freeglut/src/fg_main.c b/freeglut/freeglut/src/fg_main.c index 4c8bdd6..9dda2a3 100644 --- a/freeglut/freeglut/src/fg_main.c +++ b/freeglut/freeglut/src/fg_main.c @@ -374,7 +374,7 @@ static void fghSleepForEvents( void ) { fg_time_t msec; - if( fgState.IdleCallback || fghHavePendingRedisplays( ) ) + if( fghHavePendingRedisplays( ) ) return; msec = fghNextTimer( ); @@ -447,8 +447,8 @@ void FGAPIENTRY glutMainLoop( void ) fgSetWindow( window ); fgState.IdleCallback( ); } - - fghSleepForEvents( ); + else + fghSleepForEvents( ); } }