The original glutEnterGameMode() returns the window id of the game
authorSven Panne <sven.panne@aedion.de>
Tue, 24 May 2005 16:15:25 +0000 (16:15 +0000)
committerSven Panne <sven.panne@aedion.de>
Tue, 24 May 2005 16:15:25 +0000 (16:15 +0000)
mode window, not TRUE/FALSE, we should better follow that. Note that
most man pages claim that this function returns void, but this is
definitely wrong.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@623 7f0cb862-5218-0410-a997-914c9d46530a

ChangeLog
src/freeglut_gamemode.c

index 3259282..37c84e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1026,3 +1026,8 @@ overhead is negligible, at least for x86 (a few instructions per name).
 will happen and consequently no reshape callback will ever be called via
 the normal mechanism. To fix this, note that the game mode window needs
 to be resized and handle this before redraw.
+
+(268) The original glutEnterGameMode() returns the window id of the game
+mode window, not TRUE/FALSE, we should better follow that. Note that most
+man pages claim that this function returns void, but this is definitely
+wrong.
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;
 }
 
 /*