From: John F. Fay Date: Sun, 29 Jan 2012 03:25:31 +0000 (+0000) Subject: Moving the Windows-specific "glutInitWithExit" function to a Windows-specific file X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=eadfac5750a4b83b7054b528006d9abb2fa5696f;p=freeglut Moving the Windows-specific "glutInitWithExit" function to a Windows-specific file git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1016 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/Common/freeglut_init.c b/src/Common/freeglut_init.c index a66bb16..07f7528 100644 --- a/src/Common/freeglut_init.c +++ b/src/Common/freeglut_init.c @@ -648,16 +648,6 @@ void FGAPIENTRY glutInit( int* pargc, char** argv ) } } -#if TARGET_HOST_MS_WINDOWS -void (__cdecl *__glutExitFunc)( int return_value ) = NULL; - -void FGAPIENTRY __glutInitWithExit( int *pargc, char **argv, void (__cdecl *exit_function)(int) ) -{ - __glutExitFunc = exit_function; - glutInit(pargc, argv); -} -#endif - /* * Undoes all the "glutInit" stuff */ diff --git a/src/mswin/freeglut_init_mswin.c b/src/mswin/freeglut_init_mswin.c index 9792632..568170e 100644 --- a/src/mswin/freeglut_init_mswin.c +++ b/src/mswin/freeglut_init_mswin.c @@ -329,3 +329,14 @@ int XParseGeometry ( +/* -- PLATFORM-SPECIFIC INTERFACE FUNCTION -------------------------------------------------- */ + + +void (__cdecl *__glutExitFunc)( int return_value ) = NULL; + +void FGAPIENTRY __glutInitWithExit( int *pargc, char **argv, void (__cdecl *exit_function)(int) ) +{ + __glutExitFunc = exit_function; + glutInit(pargc, argv); +} +