Further normalization of the code's style. No substantial changes.
authorRichard Rauch <rkr@olib.org>
Fri, 7 Nov 2003 07:57:03 +0000 (07:57 +0000)
committerRichard Rauch <rkr@olib.org>
Fri, 7 Nov 2003 07:57:03 +0000 (07:57 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@312 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_display.c

index 3db6cb5..a2168a3 100644 (file)
@@ -64,16 +64,19 @@ void FGAPIENTRY glutSwapBuffers( void )
 #endif
 
     /* GLUT_FPS env var support */
-    if (fgState.FPSInterval) {
-        GLint t = glutGet(GLUT_ELAPSED_TIME);
+    if( fgState.FPSInterval )
+    {
+        GLint t = glutGet( GLUT_ELAPSED_TIME );
         fgState.SwapCount++;
-        if (fgState.SwapTime == 0)
+        if( fgState.SwapTime == 0 )
             fgState.SwapTime = t;
-        else if (t - fgState.SwapTime > fgState.FPSInterval) {
-            float time = 0.001f * (t - fgState.SwapTime);
-            float fps = (float) fgState.SwapCount / time;
-            fprintf(stderr, "freeglut: %d frames in %.2f seconds = %.2f FPS\n",
-                    fgState.SwapCount, time, fps);
+        else if( t - fgState.SwapTime > fgState.FPSInterval )
+        {
+            float time = 0.001f * ( t - fgState.SwapTime );
+            float fps = ( float )fgState.SwapCount / time;
+            fprintf( stderr,
+                     "freeglut: %d frames in %.2f seconds = %.2f FPS\n",
+                     fgState.SwapCount, time, fps );
             fgState.SwapTime = t;
             fgState.SwapCount = 0;
         }
@@ -89,7 +92,7 @@ void FGAPIENTRY glutPostWindowRedisplay( int windowID )
 
     freeglut_assert_ready;
     window = fgWindowByID( windowID );
-    freeglut_return_if_fail( window != NULL );
+    freeglut_return_if_fail( window );
     window->State.Redisplay = TRUE;
 }