X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_menu.c;h=ea5837e807d3aff8115170ca7e1079565437f349;hb=ded8742fba5a4622b49778679cc7e26d197d75c5;hp=a96f5d666d4f0c322e0f13eddbae8abf4fcf260d;hpb=d8cf5641290d813d8262cea9bc72ab009b0c6df2;p=freeglut diff --git a/src/freeglut_menu.c b/src/freeglut_menu.c index a96f5d6..ea5837e 100644 --- a/src/freeglut_menu.c +++ b/src/freeglut_menu.c @@ -25,6 +25,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#define FREEGLUT_BUILDING_LIB #include #include "freeglut_internal.h" @@ -778,6 +779,14 @@ 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 */