using FREE_GLUT_BUILD_STATIC_LIBS and FREEGLUT_BUILD_SHARED_LIBS instead of their...
[freeglut] / src / fg_window.c
index 3b61192..711defb 100644 (file)
@@ -148,6 +148,7 @@ void fgOpenWindow( SFG_Window* window, const char* title,
 #endif
     window->Window.attribute_v_coord = -1;
     window->Window.attribute_v_normal = -1;
+    window->Window.attribute_v_texture = -1;
 
     fgInitGL2();
 
@@ -437,9 +438,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;
     }