diff options
| author | Ray <[email protected]> | 2018-10-08 13:29:42 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-10-08 13:29:42 +0200 |
| commit | 97f6454982e439850ff86b2552c9c6b4e0d8076b (patch) | |
| tree | 931150fa2ee6c2ae13417ec159c291add9c68529 /src | |
| parent | ca1e309d9d132debb40f55f57a177af085e49194 (diff) | |
| download | raylib-97f6454982e439850ff86b2552c9c6b4e0d8076b.tar.gz raylib-97f6454982e439850ff86b2552c9c6b4e0d8076b.zip | |
Corrected issue with native handler on OSX
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -145,15 +145,14 @@ // Support retrieving native window handlers #if defined(_WIN32) - #define GLFW_EXPOSE_NATIVE_WIN32 + #define GLFW_EXPOSE_NATIVE_WIN32 + #include <GLFW/glfw3native.h> // WARNING: It requires customization to avoid windows.h inclusion! #elif defined(__linux__) //#define GLFW_EXPOSE_NATIVE_X11 // WARNING: Exposing Xlib.h > X.h results in dup symbols for Font type //GLFW_EXPOSE_NATIVE_WAYLAND //GLFW_EXPOSE_NATIVE_MIR - #elif defined(__APPLE__) - //#define GLFW_EXPOSE_NATIVE_COCOA // WARNING: NSGL typedef redefinition with different types ('struct objc_object *' vs 'void *') > glfw3native issue? #endif - #include <GLFW/glfw3native.h> // WARNING: It requires customization to avoid windows.h inclusion! + #if !defined(SUPPORT_BUSY_WAIT_LOOP) && defined(_WIN32) // NOTE: Those functions require linking with winmm library @@ -167,8 +166,9 @@ #elif defined(__APPLE__) #include <unistd.h> // Required for: usleep() #include <objc/message.h> // Required for: objc_msgsend(), sel_registerName() + #define GLFW_EXPOSE_NATIVE_COCOA #define GLFW_EXPOSE_NATIVE_NSGL - #include <GLFW/glfw3native.h> // Required for: glfwGetNSGLContext() + #include <GLFW/glfw3native.h> // Required for: glfwGetCocoaWindow(), glfwGetNSGLContext() #endif #if defined(PLATFORM_ANDROID) @@ -817,7 +817,7 @@ void *GetWindowHandle(void) return NULL; // TODO: Find a way to return value... cast to void *? #elif defined(__APPLE__) // NOTE: Returned handle is: void *id - return NULL; //glfwGetCocoaWindow(window); + return glfwGetCocoaWindow(window); #else return NULL; #endif |
