gamemode: just go fullscreen
authorDiederick Niehorster <dcnieho@gmail.com>
Wed, 6 Mar 2013 09:17:52 +0000 (09:17 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Wed, 6 Mar 2013 09:17:52 +0000 (09:17 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1558 7f0cb862-5218-0410-a997-914c9d46530a

src/fg_gamemode.c
src/fg_window.c

index eb29131..d210a88 100644 (file)
@@ -112,9 +112,7 @@ int FGAPIENTRY glutEnterGameMode( void )
         GL_TRUE, GL_FALSE
     );
 
-    fgStructure.GameModeWindow->State.Width  = fgState.GameModeSize.X;
-    fgStructure.GameModeWindow->State.Height = fgState.GameModeSize.Y;
-    fgStructure.GameModeWindow->State.NeedToResize = GL_TRUE;
+    glutFullScreen();
 
     fgPlatformEnterGameMode();
 
index 3b61192..ad151cf 100644 (file)
@@ -437,9 +437,11 @@ void FGAPIENTRY glutFullScreen( void )
         fgWarning("glutFullScreen called on a child window, ignoring...");
         return;
     }
-    else if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==win->ID)
+    else if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==win->ID && win->State.IsFullscreen)
     {
-        /* Ignore fullscreen call on GameMode window, those are always fullscreen already */
+        /* Ignore fullscreen call on GameMode window, those are always fullscreen already
+         * only exception is during first entering GameMode
+         */
         return;
     }