From eadfac5750a4b83b7054b528006d9abb2fa5696f Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sun, 29 Jan 2012 03:25:31 +0000 Subject: [PATCH 1/1] 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 --- src/Common/freeglut_init.c | 10 ---------- src/mswin/freeglut_init_mswin.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) 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); +} + -- 1.7.10.4