projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version bump in cmake, that should have been done for 3.2.0. Changed SO_MINOR
[freeglut]
/
src
/
fg_menu.c
diff --git
a/src/fg_menu.c
b/src/fg_menu.c
index
1b07b1a
..
53112dc
100644
(file)
--- 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 )
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;
else
{
*x = fgDisplay.ScreenWidth;
@@
-785,24
+785,30
@@
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)
/* 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.");
+ {
+ fgError( "Menu manipulation not allowed while menus in use." );
+ }
return fgCreateMenu( callback, userData )->ID;
}
/* Standard glutCreateMenu */
return fgCreateMenu( callback, userData )->ID;
}
/* Standard glutCreateMenu */
-static void glutCreateMenuCallback( int menu, FGCBUserData userData )
+static void fghCreateMenuCallback( int menu, FGCBUserData userData )
{
{
- FGCBMenu callback = (FGCBMenu)userData;
- callback( menu );
+ FGCBMenu* callback = (FGCBMenu*)&userData;
+ (*callback)( menu );
}
int FGAPIENTRY glutCreateMenu( FGCBMenu callback )
{
}
int FGAPIENTRY glutCreateMenu( FGCBMenu callback )
{
+ FGCBMenu* reference;
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" );
if (!callback)
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutCreateMenu" );
if (!callback)
+ {
return glutCreateMenuUcall( NULL, NULL );
return glutCreateMenuUcall( NULL, NULL );
- return glutCreateMenuUcall( glutCreateMenuCallback, (FGCBUserData)callback );
+ }
+ reference = &callback;
+ return glutCreateMenuUcall( fghCreateMenuCallback, *((FGCBUserData*)reference) );
}
/*
}
/*