Rewrote glutFullscreen().
[freeglut] / src / freeglut_menu.c
index fe7f42d..f49ca52 100644 (file)
 
 
 /*
- * These variables should be moved into the freeglut global state, but for now,
- * we'll put them here.  They are for rendering the freeglut menu items.
+ * These variables are for rendering the freeglut menu items.
+ *
  * The choices are fore- and background, with and without h for Highlighting.
  * Old GLUT appeared to be system-dependant for its colors (sigh) so we are
  * too.  These variables should be stuffed into global state and initialized
  * via the glutInit*() system.
  */
-
 #if TARGET_HOST_WIN32
 static float menu_pen_fore  [4] = {0.0f,  0.0f,  0.0f,  1.0f};
 static float menu_pen_back  [4] = {0.85f, 0.85f, 0.85f, 1.0f};
@@ -862,15 +861,15 @@ void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int subMenuID
     SFG_MenuEntry* menuEntry = NULL;
 
     freeglut_assert_ready;
-    freeglut_return_if_fail( fgStructure.Menu != NULL );
-    freeglut_return_if_fail( subMenu != NULL );
+    freeglut_return_if_fail( fgStructure.Menu );
+    freeglut_return_if_fail( subMenu );
     menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
-    freeglut_return_if_fail( menuEntry != NULL );
+    freeglut_return_if_fail( menuEntry );
 
     /*
      * We want it to become a sub menu entry, so:
      */
-    if( menuEntry->Text != NULL )
+    if( menuEntry->Text )
         free( menuEntry->Text );
 
     menuEntry->Text = strdup( label );
@@ -890,7 +889,7 @@ void FGAPIENTRY glutRemoveMenuItem( int item )
     freeglut_assert_ready;
     freeglut_return_if_fail( fgStructure.Menu );
     menuEntry = fghFindMenuEntry( fgStructure.Menu, item );
-    freeglut_return_if_fail( menuEntry != NULL );
+    freeglut_return_if_fail( menuEntry );
     fgListRemove( &fgStructure.Menu->Entries, &menuEntry->Node );
     free( menuEntry->Text );
     free( menuEntry );