Rationalizing the names of the platform-specific functions so that they begin with...
[freeglut] / src / mswin / freeglut_ext_mswin.c
index 2df7d9b..da35307 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * freeglut_cursor_mswin.c\r
+ * freeglut_ext_mswin.c\r
  *\r
  * The Windows-specific mouse cursor related stuff.\r
  *\r
 #include <GL/freeglut.h>\r
 #include "freeglut_internal_mswin.h"\r
 \r
+GLUTproc fgPlatformGlutGetProcAddress( const char* procName )\r
+{\r
+#if !defined(_WIN32_WCE)\r
+    /* optimization: quick initial check */\r
+    if( strncmp( procName, "glut", 4 ) != 0 )\r
+        return NULL;\r
+\r
+#define CHECK_NAME(x) if( strcmp( procName, #x ) == 0) return (GLUTproc)x;\r
+    CHECK_NAME(glutJoystickFunc);\r
+    CHECK_NAME(glutForceJoystickFunc);\r
+    CHECK_NAME(glutGameModeString);\r
+    CHECK_NAME(glutEnterGameMode);\r
+    CHECK_NAME(glutLeaveGameMode);\r
+    CHECK_NAME(glutGameModeGet);\r
+#undef CHECK_NAME\r
+#endif /* !defined(_WIN32_WCE) */\r
+\r
+    return NULL;\r
+}\r
+\r
 \r
 \r
 SFG_Proc fghGetProcAddress( const char *procName )\r