The original glutEnterGameMode() returns the window id of the game
[freeglut] / src / freeglut_gamemode.c
index 087212e..bdd180f 100644 (file)
@@ -425,7 +425,7 @@ int FGAPIENTRY glutEnterGameMode( void )
     if( ! fghChangeDisplayMode( GL_FALSE ) )
     {
         fgWarning( "failed to change screen settings" );
-        return FALSE;
+        return 0;
     }
 
     fgStructure.GameMode = fgCreateWindow(
@@ -529,7 +529,7 @@ int FGAPIENTRY glutEnterGameMode( void )
 
 #endif
 
-    return TRUE;
+    return fgStructure.GameMode->ID;
 }
 
 /*