From 90b777df737006ae0b92acfdd0efc29f7bec136c Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Sun, 29 Jan 2012 13:06:54 +0000 Subject: [PATCH] Moving the Windows-specific "__glutCreateMenuWIthExit" function to the Windows-specific file git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1027 7f0cb862-5218-0410-a997-914c9d46530a --- src/Common/freeglut_menu.c | 8 -------- src/mswin/freeglut_menu_mswin.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Common/freeglut_menu.c b/src/Common/freeglut_menu.c index 4ea31aa..2fc528b 100644 --- a/src/Common/freeglut_menu.c +++ b/src/Common/freeglut_menu.c @@ -783,14 +783,6 @@ int FGAPIENTRY glutCreateMenu( void(* callback)( int ) ) return fgCreateMenu( callback )->ID; } -#if TARGET_HOST_MS_WINDOWS -int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) ) -{ - __glutExitFunc = exit_function; - return glutCreateMenu( callback ); -} -#endif - /* * Destroys a menu object, removing all references to it */ diff --git a/src/mswin/freeglut_menu_mswin.c b/src/mswin/freeglut_menu_mswin.c index 3def1b9..5731cef 100644 --- a/src/mswin/freeglut_menu_mswin.c +++ b/src/mswin/freeglut_menu_mswin.c @@ -34,3 +34,15 @@ GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y ) *x = glutGet ( GLUT_SCREEN_WIDTH ); *y = glutGet ( GLUT_SCREEN_HEIGHT ); } + + + +/* -- PLATFORM-SPECIFIC INTERFACE FUNCTION -------------------------------------------------- */ + + +int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) ) +{ + __glutExitFunc = exit_function; + return glutCreateMenu( callback ); +} + -- 1.7.10.4