Leave game mode on "deinitialization" if we entered it, per e-mail from John Tsiombik...
[freeglut] / src / freeglut_init.c
index 8c254bc..f59a456 100644 (file)
@@ -413,6 +413,11 @@ void fgDeinitialize( void )
         return;
     }
 
+       /* If we're in game mode, we want to leave game mode */
+    if( fgStructure.GameModeWindow ) {
+        glutLeaveGameMode();
+    }
+
     /* If there was a menu created, destroy the rendering context */
     if( fgStructure.MenuContext )
     {