From abfbf078306ceded825a967e5f582013b3f62d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 13 Feb 2026 15:16:14 +0100 Subject: [PATCH] Null: Fix dynamic library name selection The name selection for the Vulkan loader and the EGL and client libraries used the GLFW platform macros instead of the platform's own macros. This caused the selection to be incorrect when building only the Null platform on any platform but Linux (where it only accidentally worked due to being the default case). OSMesa was already using the correct method. --- src/egl_context.c | 16 ++++++++-------- src/vulkan.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/egl_context.c b/src/egl_context.c index 9aec5a2a..156adb40 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -365,10 +365,10 @@ GLFWbool _glfwInitEGL(void) { #if defined(_GLFW_EGL_LIBRARY) _GLFW_EGL_LIBRARY, -#elif defined(_GLFW_WIN32) +#elif defined(_WIN32) "libEGL.dll", "EGL.dll", -#elif defined(_GLFW_COCOA) +#elif defined(__APPLE__) "libEGL.dylib", #elif defined(__CYGWIN__) "libEGL-1.so", @@ -761,10 +761,10 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, { #if defined(_GLFW_GLESV1_LIBRARY) _GLFW_GLESV1_LIBRARY, -#elif defined(_GLFW_WIN32) +#elif defined(_WIN32) "GLESv1_CM.dll", "libGLES_CM.dll", -#elif defined(_GLFW_COCOA) +#elif defined(__APPLE__) "libGLESv1_CM.dylib", #elif defined(__OpenBSD__) || defined(__NetBSD__) "libGLESv1_CM.so", @@ -778,10 +778,10 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, { #if defined(_GLFW_GLESV2_LIBRARY) _GLFW_GLESV2_LIBRARY, -#elif defined(_GLFW_WIN32) +#elif defined(_WIN32) "GLESv2.dll", "libGLESv2.dll", -#elif defined(_GLFW_COCOA) +#elif defined(__APPLE__) "libGLESv2.dylib", #elif defined(__CYGWIN__) "libGLESv2-2.so", @@ -796,8 +796,8 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window, { #if defined(_GLFW_OPENGL_LIBRARY) _GLFW_OPENGL_LIBRARY, -#elif defined(_GLFW_WIN32) -#elif defined(_GLFW_COCOA) +#elif defined(_WIN32) +#elif defined(__APPLE__) #elif defined(__OpenBSD__) || defined(__NetBSD__) "libGL.so", #else diff --git a/src/vulkan.c b/src/vulkan.c index 8f25f5ee..f5cc4872 100644 --- a/src/vulkan.c +++ b/src/vulkan.c @@ -55,9 +55,9 @@ GLFWbool _glfwInitVulkan(int mode) { #if defined(_GLFW_VULKAN_LIBRARY) _glfw.vk.handle = _glfwPlatformLoadModule(_GLFW_VULKAN_LIBRARY); -#elif defined(_GLFW_WIN32) +#elif defined(_WIN32) _glfw.vk.handle = _glfwPlatformLoadModule("vulkan-1.dll"); -#elif defined(_GLFW_COCOA) +#elif defined(__APPLE__) _glfw.vk.handle = _glfwPlatformLoadModule("libvulkan.1.dylib"); if (!_glfw.vk.handle) _glfw.vk.handle = _glfwLoadLocalVulkanLoaderCocoa();