From a9282bad29f951eabcacefc91fa07e68b05fc14b Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 30 Oct 2016 00:02:11 +0200 Subject: [PATCH] Disable all dl* calls for _GLFW_VULKAN_STATIC --- src/vulkan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vulkan.c b/src/vulkan.c index 30f4b874..2d3bfe6c 100644 --- a/src/vulkan.c +++ b/src/vulkan.c @@ -136,8 +136,10 @@ GLFWbool _glfwInitVulkan(void) void _glfwTerminateVulkan(void) { +#if !defined(_GLFW_VULKAN_STATIC) if (_glfw.vk.handle) _glfw_dlclose(_glfw.vk.handle); +#endif } const char* _glfwGetVulkanResultString(VkResult result) @@ -236,8 +238,10 @@ GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance, } proc = (GLFWvkproc) vkGetInstanceProcAddr(instance, procname); +#if !defined(_GLFW_VULKAN_STATIC) if (!proc) proc = (GLFWvkproc) _glfw_dlsym(_glfw.vk.handle, procname); +#endif return proc; }