From 4eeaaaa08c01ff69f8e3419d7531c3182390814e Mon Sep 17 00:00:00 2001 From: rkrolib Date: Mon, 27 Oct 2003 05:03:31 +0000 Subject: [PATCH] Partially (re-?)unified some of the glutMainLoopEvent() code. The only code that really needs to be system-specific is the window event handling, which in MS-WINDOWS is tucked into a separate function. In UNIX/X11, it's all spilled out into glutMainLoopEvent() for some reason. If the X11 code could be tucked into another function, glutMainLoopEvent() could be platform-independant. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@245 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_main.c | 41 ++------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_main.c b/freeglut/freeglut/src/freeglut_main.c index f6c2239..80178b6 100644 --- a/freeglut/freeglut/src/freeglut_main.c +++ b/freeglut/freeglut/src/freeglut_main.c @@ -995,24 +995,6 @@ void FGAPIENTRY glutMainLoopEvent( void ) } } - { - /* - * Have all the timers checked. - */ - fghCheckTimers(); - - /* - * Poll the joystick and notify all windows that want to be notified... - */ - fghCheckJoystickPolls(); - - /* - * Remember about displaying all the windows that have - * been marked for a redisplay (possibly in the idle call): - */ - fghDisplayAll(); - } - #elif TARGET_HOST_WIN32 MSG stMsg; @@ -1035,28 +1017,11 @@ void FGAPIENTRY glutMainLoopEvent( void ) DispatchMessage( &stMsg ); } - { - /* - * Have all the timers checked. - */ - fghCheckTimers(); - - /* - * Poll the joystick and notify all windows that want to be notified... - */ - fghCheckJoystickPolls(); - - /* - * Remember about displaying all the windows that have - * been marked for a redisplay (possibly in the idle call): - */ - fghDisplayAll(); - } #endif - /* - * If an event caused a window to be closed, do the actual closing here - */ + fghCheckTimers (); + fghCheckJoystickPolls (); + fghDisplayAll (); fgCloseWindows () ; }