freeglut/freeglut-2.8.1-nocheck.patch

86 lines
3.5 KiB
Diff

diff -up freeglut-2.8.1/src/freeglut_menu.c.nocheck freeglut-2.8.1/src/freeglut_menu.c
--- freeglut-2.8.1/src/freeglut_menu.c.nocheck 2014-01-23 14:43:19.386742857 +0100
+++ freeglut-2.8.1/src/freeglut_menu.c 2014-01-23 14:44:26.322770844 +0100
@@ -866,8 +866,6 @@ int FGAPIENTRY glutCreateMenu( void(* ca
{
/* The menu object creation code resides in freeglut_structure.c */
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
return fgCreateMenu( callback )->ID;
}
@@ -891,9 +889,6 @@ void FGAPIENTRY glutDestroyMenu( int men
freeglut_return_if_fail( menu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
-
/* The menu object destruction code resides in freeglut_structure.c */
fgDestroyMenu( menu );
}
@@ -936,8 +931,6 @@ void FGAPIENTRY glutAddMenuEntry( const
menuEntry = (SFG_MenuEntry *)calloc( sizeof(SFG_MenuEntry), 1 );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
menuEntry->Text = strdup( label );
menuEntry->ID = value;
@@ -961,8 +954,6 @@ void FGAPIENTRY glutAddSubMenu( const ch
subMenu = fgMenuByID( subMenuID );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
freeglut_return_if_fail( subMenu );
@@ -984,8 +975,6 @@ void FGAPIENTRY glutChangeToMenuEntry( i
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutChangeToMenuEntry" );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
/* Get n-th menu entry in the current menu, starting from one: */
menuEntry = fghFindMenuEntry( fgStructure.CurrentMenu, item );
@@ -1014,8 +1003,6 @@ void FGAPIENTRY glutChangeToSubMenu( int
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutChangeToSubMenu" );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
/* Get handle to sub menu */
subMenu = fgMenuByID( subMenuID );
@@ -1048,8 +1035,6 @@ void FGAPIENTRY glutRemoveMenuItem( int
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutRemoveMenuItem" );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
/* Get n-th menu entry in the current menu, starting from one: */
menuEntry = fghFindMenuEntry( fgStructure.CurrentMenu, item );
@@ -1074,8 +1059,6 @@ void FGAPIENTRY glutAttachMenu( int butt
freeglut_return_if_fail( fgStructure.CurrentWindow );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
freeglut_return_if_fail( button >= 0 );
freeglut_return_if_fail( button < FREEGLUT_MAX_MENUS );
@@ -1093,8 +1076,6 @@ void FGAPIENTRY glutDetachMenu( int butt
freeglut_return_if_fail( fgStructure.CurrentWindow );
freeglut_return_if_fail( fgStructure.CurrentMenu );
- if (fgGetActiveMenu())
- fgError("Menu manipulation not allowed while menus in use.");
freeglut_return_if_fail( button >= 0 );
freeglut_return_if_fail( button < FREEGLUT_MAX_MENUS );