diff --git a/src/platform.h b/src/platform.h index cc842eb8..0c593676 100644 --- a/src/platform.h +++ b/src/platform.h @@ -92,30 +92,6 @@ #define GLFW_LINUX_LIBRARY_JOYSTICK_STATE #endif -#if defined(_WIN32) - #include "win32_thread.h" - #define GLFW_POSIX_TLS_STATE - #define GLFW_POSIX_MUTEX_STATE -#else - #include "posix_thread.h" - #define GLFW_WIN32_TLS_STATE - #define GLFW_WIN32_MUTEX_STATE -#endif - -#if defined(_WIN32) - #include "win32_time.h" - #define GLFW_POSIX_LIBRARY_TIMER_STATE - #define GLFW_COCOA_LIBRARY_TIMER_STATE -#elif defined(__APPLE__) - #include "cocoa_time.h" - #define GLFW_WIN32_LIBRARY_TIMER_STATE - #define GLFW_POSIX_LIBRARY_TIMER_STATE -#else - #include "posix_time.h" - #define GLFW_WIN32_LIBRARY_TIMER_STATE - #define GLFW_COCOA_LIBRARY_TIMER_STATE -#endif - #define GLFW_PLATFORM_WINDOW_STATE \ GLFW_WIN32_WINDOW_STATE \ GLFW_COCOA_WINDOW_STATE \ @@ -142,14 +118,6 @@ GLFW_COCOA_JOYSTICK_STATE \ GLFW_LINUX_JOYSTICK_STATE -#define GLFW_PLATFORM_TLS_STATE \ - GLFW_WIN32_TLS_STATE \ - GLFW_POSIX_TLS_STATE \ - -#define GLFW_PLATFORM_MUTEX_STATE \ - GLFW_WIN32_MUTEX_STATE \ - GLFW_POSIX_MUTEX_STATE \ - #define GLFW_PLATFORM_LIBRARY_WINDOW_STATE \ GLFW_WIN32_LIBRARY_WINDOW_STATE \ GLFW_COCOA_LIBRARY_WINDOW_STATE \ @@ -162,11 +130,6 @@ GLFW_COCOA_LIBRARY_JOYSTICK_STATE \ GLFW_LINUX_LIBRARY_JOYSTICK_STATE -#define GLFW_PLATFORM_LIBRARY_TIMER_STATE \ - GLFW_WIN32_LIBRARY_TIMER_STATE \ - GLFW_COCOA_LIBRARY_TIMER_STATE \ - GLFW_POSIX_LIBRARY_TIMER_STATE \ - #define GLFW_PLATFORM_CONTEXT_STATE \ GLFW_WGL_CONTEXT_STATE \ GLFW_NSGL_CONTEXT_STATE \ @@ -177,3 +140,24 @@ GLFW_NSGL_LIBRARY_CONTEXT_STATE \ GLFW_GLX_LIBRARY_CONTEXT_STATE +#if defined(_WIN32) + #include "win32_thread.h" + #define GLFW_PLATFORM_TLS_STATE GLFW_WIN32_TLS_STATE + #define GLFW_PLATFORM_MUTEX_STATE GLFW_WIN32_MUTEX_STATE +#else + #include "posix_thread.h" + #define GLFW_PLATFORM_TLS_STATE GLFW_POSIX_TLS_STATE + #define GLFW_PLATFORM_MUTEX_STATE GLFW_POSIX_MUTEX_STATE +#endif + +#if defined(_WIN32) + #include "win32_time.h" + #define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_WIN32_LIBRARY_TIMER_STATE +#elif defined(__APPLE__) + #include "cocoa_time.h" + #define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_COCOA_LIBRARY_TIMER_STATE +#else + #include "posix_time.h" + #define GLFW_PLATFORM_LIBRARY_TIMER_STATE GLFW_POSIX_LIBRARY_TIMER_STATE +#endif +