From 0e14da55ac7146115544578b19e3941e1f244db1 Mon Sep 17 00:00:00 2001 From: Not-Nik Date: Mon, 6 Feb 2023 23:04:27 +0100 Subject: [PATCH] Enable GetWindowHandle() on macOS --- src/rcore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index 98800a790..7af655167 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -242,6 +242,7 @@ #include // Required for: usleep() //#define GLFW_EXPOSE_NATIVE_COCOA // WARNING: Fails due to type redefinition + void *glfwGetCocoaWindow(GLFWwindow* handle); #include "GLFW/glfw3native.h" // Required for: glfwGetCocoaWindow() #endif @@ -1677,7 +1678,7 @@ void *GetWindowHandle(void) #endif #if defined(__APPLE__) // NOTE: Returned handle is: (objc_object *) - return NULL; // TODO: return (void *)glfwGetCocoaWindow(window); + return (void *)glfwGetCocoaWindow(CORE.Window.handle); #endif return NULL;