Moving the "glutCreateWindowWithExit" and its associated variable to the Windows...
authorJohn F. Fay <johnffay@nettally.com>
Sun, 29 Jan 2012 03:22:28 +0000 (03:22 +0000)
committerJohn F. Fay <johnffay@nettally.com>
Sun, 29 Jan 2012 03:22:28 +0000 (03:22 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1015 7f0cb862-5218-0410-a997-914c9d46530a

src/Common/freeglut_internal.h
src/Common/freeglut_window.c
src/mswin/freeglut_internal_mswin.h
src/mswin/freeglut_window_mswin.c

index f4fc756..e4b9d8f 100644 (file)
@@ -991,10 +991,6 @@ int fgHintPresent(Window window, Atom property, Atom hint);
 \r
 SFG_Proc fghGetProcAddress( const char *procName );\r
 \r
-#if TARGET_HOST_MS_WINDOWS\r
-extern void (__cdecl *__glutExitFunc)( int return_value );\r
-#endif\r
-\r
 #endif /* FREEGLUT_INTERNAL_H */\r
 \r
 /*** END OF FILE ***/\r
index 1468627..cde6407 100644 (file)
@@ -986,14 +986,6 @@ int FGAPIENTRY glutCreateWindow( const char* title )
                            GL_FALSE, GL_FALSE )->ID;\r
 }\r
 \r
-#if TARGET_HOST_MS_WINDOWS\r
-int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) )\r
-{\r
-  __glutExitFunc = exit_function;\r
-  return glutCreateWindow( title );\r
-}\r
-#endif\r
-\r
 /*\r
  * This function creates a sub window.\r
  */\r
index 628c06d..c83f231 100644 (file)
@@ -49,6 +49,8 @@ struct tagSFG_PlatformContext
 };\r
 \r
 \r
+/* Function to be called on exit */\r
+extern void (__cdecl *__glutExitFunc)( int return_value );\r
 \r
 \r
 #endif  /* FREEGLUT_INTERNAL_MSWIN_H */
\ No newline at end of file
index 583d5f7..5a33ec5 100644 (file)
@@ -1078,3 +1078,12 @@ void fgPlatformGlutFullScreenToggle( SFG_Window *win )
 }\r
 \r
 \r
+/* -- PLATFORM-SPECIFIC INTERFACE FUNCTION -------------------------------------------------- */\r
+\r
+\r
+int FGAPIENTRY __glutCreateWindowWithExit( const char *title, void (__cdecl *exit_function)(int) )\r
+{\r
+  __glutExitFunc = exit_function;\r
+  return glutCreateWindow( title );\r
+}\r
+\r