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:
fayjf 2009-07-10 16:18:06 +00:00
parent d011e8dc74
commit d59ab1c02e
4 changed files with 11 additions and 11 deletions

View File

@ -854,13 +854,13 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
}
}
#ifdef _WIN32
void (__cdecl *__glutExitFunc)( int retval ) = NULL;
#ifdef TARGET_HOST_MS_WINDOWS
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;
glutInit(argcp, argv);
__glutExitFunc = exit_function;
glutInit(pargc, argv);
}
#endif

View File

@ -934,7 +934,7 @@ int fgHintPresent(Window window, Atom property, Atom hint);
SFG_Proc fghGetProcAddress( const char *procName );
#ifdef _WIN32
extern void (__cdecl *__glutExitFunc)( int retval );
extern void (__cdecl *__glutExitFunc)( int return_value );
#endif
#endif /* FREEGLUT_INTERNAL_H */

View File

@ -779,10 +779,10 @@ int FGAPIENTRY glutCreateMenu( void(* callback)( int ) )
return fgCreateMenu( callback )->ID;
}
#ifdef _WIN32
int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exitfunc)(int) )
#ifdef TARGET_HOST_MS_WINDOWS
int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) )
{
__glutExitFunc = exitfunc;
__glutExitFunc = exit_function;
return glutCreateMenu( callback );
}
#endif

View File

@ -1094,9 +1094,9 @@ int FGAPIENTRY glutCreateWindow( const char* title )
}
#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 );
}
#endif