From fb4798198cb4a3053b318025c0213fd0fbc78a85 Mon Sep 17 00:00:00 2001 From: fayjf 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: https://svn.code.sf.net/p/freeglut/code/trunk@1027 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/Common/freeglut_menu.c | 8 -------- freeglut/freeglut/src/mswin/freeglut_menu_mswin.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/freeglut/freeglut/src/Common/freeglut_menu.c b/freeglut/freeglut/src/Common/freeglut_menu.c index 4ea31aa..2fc528b 100644 --- a/freeglut/freeglut/src/Common/freeglut_menu.c +++ b/freeglut/freeglut/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/freeglut/freeglut/src/mswin/freeglut_menu_mswin.c b/freeglut/freeglut/src/mswin/freeglut_menu_mswin.c index 3def1b9..5731cef 100644 --- a/freeglut/freeglut/src/mswin/freeglut_menu_mswin.c +++ b/freeglut/freeglut/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 ); +} +