Fixing game mode in X11 so that it doesn't override unspecified settings per e-mail...
[freeglut] / src / freeglut_internal.h
index ed01830..2a5a4db 100644 (file)
@@ -801,11 +801,12 @@ extern SFG_State fgState;
  * A call to those macros assures us that there is a current
  * window set, respectively:
  */
-#define  FREEGLUT_EXIT_IF_NO_WINDOW( string )                   \
-  if ( ! fgStructure.CurrentWindow )                            \
-  {                                                             \
-    fgError ( " ERROR:  Function <%s> called"                   \
-              " with no current window defined.", (string) ) ;  \
+#define  FREEGLUT_EXIT_IF_NO_WINDOW( string )                               \
+  if ( ! fgStructure.CurrentWindow &&                                       \
+       ( fgState.ActionOnWindowClose != GLUT_ACTION_CONTINUE_EXECUTION ) )  \
+  {                                                                         \
+    fgError ( " ERROR:  Function <%s> called"                               \
+              " with no current window defined.", (string) ) ;              \
   }
 
 /*
@@ -825,7 +826,7 @@ void fgDestroyStructure( void );
 
 /* A helper function to check if a display mode is possible to use */
 #if TARGET_HOST_POSIX_X11
-GLXFBConfig* fgChooseFBConfig( void );
+GLXFBConfig* fgChooseFBConfig( int* numcfgs );
 #endif
 
 /* The window procedure for Win32 events handling */