X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_menu.c;h=53112dc210216eda54be2c51392c799697fc90fe;hb=1b70e38531ff6972e40bc48ba118928c65db59c2;hp=daad294a7ee64a5289ca524da9739eb0b1be38a6;hpb=155d9d0f851f035871188033b7b757ac2fd02693;p=freeglut diff --git a/src/fg_menu.c b/src/fg_menu.c index daad294..53112dc 100644 --- a/src/fg_menu.c +++ b/src/fg_menu.c @@ -135,7 +135,7 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry ) static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y ) { if( fgStructure.GameModeWindow ) - fgPlatformGetGameModeVMaxExtent ( window, x, y ); + fgPlatformGetGameModeVMaxExtent ( window, x, y ); else { *x = fgDisplay.ScreenWidth; @@ -784,10 +784,10 @@ int FGAPIENTRY glutCreateMenuUcall( FGCBMenuUC callback, FGCBUserData userData ) { /* The menu object creation code resides in fg_structure.c */ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenuUcall" ); - if (fgState.ActiveMenus) - { - fgError( "Menu manipulation not allowed while menus in use." ); - } + if (fgState.ActiveMenus) + { + fgError( "Menu manipulation not allowed while menus in use." ); + } return fgCreateMenu( callback, userData )->ID; } @@ -801,12 +801,13 @@ static void fghCreateMenuCallback( int menu, FGCBUserData userData ) int FGAPIENTRY glutCreateMenu( FGCBMenu callback ) { + FGCBMenu* reference; FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" ); if (!callback) { return glutCreateMenuUcall( NULL, NULL ); } - FGCBMenu* reference = &callback; + reference = &callback; return glutCreateMenuUcall( fghCreateMenuCallback, *((FGCBUserData*)reference) ); }