Making the "AT_EXIT" hack look a bit less like a copy-and-paste
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@828 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
d011e8dc74
commit
d59ab1c02e
@ -854,13 +854,13 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef TARGET_HOST_MS_WINDOWS
|
||||||
void (__cdecl *__glutExitFunc)( int retval ) = NULL;
|
void (__cdecl *__glutExitFunc)( int return_value ) = NULL;
|
||||||
|
|
||||||
void FGAPIENTRY __glutInitWithExit( int *argcp, char **argv, void (__cdecl *exitfunc)(int) )
|
void FGAPIENTRY __glutInitWithExit( int *pargc, char **argv, void (__cdecl *exit_function)(int) )
|
||||||
{
|
{
|
||||||
__glutExitFunc = exitfunc;
|
__glutExitFunc = exit_function;
|
||||||
glutInit(argcp, argv);
|
glutInit(pargc, argv);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -934,7 +934,7 @@ int fgHintPresent(Window window, Atom property, Atom hint);
|
|||||||
SFG_Proc fghGetProcAddress( const char *procName );
|
SFG_Proc fghGetProcAddress( const char *procName );
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
extern void (__cdecl *__glutExitFunc)( int retval );
|
extern void (__cdecl *__glutExitFunc)( int return_value );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* FREEGLUT_INTERNAL_H */
|
#endif /* FREEGLUT_INTERNAL_H */
|
||||||
|
@ -779,10 +779,10 @@ int FGAPIENTRY glutCreateMenu( void(* callback)( int ) )
|
|||||||
return fgCreateMenu( callback )->ID;
|
return fgCreateMenu( callback )->ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef TARGET_HOST_MS_WINDOWS
|
||||||
int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exitfunc)(int) )
|
int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) )
|
||||||
{
|
{
|
||||||
__glutExitFunc = exitfunc;
|
__glutExitFunc = exit_function;
|
||||||
return glutCreateMenu( callback );
|
return glutCreateMenu( callback );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1094,9 +1094,9 @@ int FGAPIENTRY glutCreateWindow( const char* title )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exitfunc)(int) )
|
int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) )
|
||||||
{
|
{
|
||||||
__glutExitFunc = exitfunc;
|
__glutExitFunc = exit_function;
|
||||||
return glutCreateWindow( title );
|
return glutCreateWindow( title );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user