bump versions to 2.0
[freeglut] / freeglut-1.3 / freeglut_state.c
index 7116869..cb40f05 100644 (file)
@@ -122,11 +122,11 @@ void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
  */
 int FGAPIENTRY glutGet( GLenum eWhat )
 {
-  int returnValue ;
-  GLboolean boolValue ;
+    int returnValue ;
+    GLboolean boolValue ;
 
-  if ( eWhat == GLUT_INIT_STATE )
-    return ( fgState.Time.Set ) ;
+    if ( eWhat == GLUT_INIT_STATE )
+       return ( fgState.Time.Set ) ;
 
     freeglut_assert_ready;
 
@@ -364,7 +364,8 @@ int FGAPIENTRY glutGet( GLenum eWhat )
         /*
          * ...then we've got to correct the results we've just received...
          */
-        if ( fgStructure.Window->Parent == NULL )
+        if (fgStructure.GameMode != fgStructure.Window &&
+           fgStructure.Window->Parent == NULL )
         {
           winRect.left   += GetSystemMetrics( SM_CXSIZEFRAME );
           winRect.right  -= GetSystemMetrics( SM_CXSIZEFRAME );
@@ -450,7 +451,11 @@ int FGAPIENTRY glutGet( GLenum eWhat )
 
         return( fgListLength( &fgStructure.Menu->Entries ) );
 
-    case GLUT_ACTION_ON_WINDOW_CLOSE: return ( fgState.ActionOnWindowClose ) ;
+    case GLUT_ACTION_ON_WINDOW_CLOSE:
+       return fgState.ActionOnWindowClose;
+
+    case GLUT_VERSION:
+       return VERSION_MAJOR * 10000 + VERSION_MINOR * 100 + VERSION_PATCH;
 
     default:
         /*