Splitting the X11-specific "freeglut_gamemode.c" code into its own file
[freeglut] / src / mswin / freeglut_menu_mswin.c
index 5d22b16..e280624 100644 (file)
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
  */\r
 \r
+#define FREEGLUT_BUILDING_LIB\r
 #include <GL/freeglut.h>\r
-#include "freeglut_internal_mswin.h"\r
+#include "../Common/freeglut_internal.h"\r
 \r
 \r
-GLvoid fghGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )\r
+GLvoid fgPlatformGetGameModeVMaxExtent( SFG_Window* window, int* x, int* y )\r
 {\r
     *x = glutGet ( GLUT_SCREEN_WIDTH );\r
     *y = glutGet ( GLUT_SCREEN_HEIGHT );\r
 }\r
+\r
+\r
+\r
+/* -- PLATFORM-SPECIFIC INTERFACE FUNCTION -------------------------------------------------- */\r
+\r
+int FGAPIENTRY __glutCreateMenuWithExit( void(* callback)( int ), void (__cdecl *exit_function)(int) )\r
+{\r
+  __glutExitFunc = exit_function;\r
+  return glutCreateMenu( callback );\r
+}\r
+\r