Disable all dl* calls for _GLFW_VULKAN_STATIC

This commit is contained in:
Camilla Berglund 2016-10-30 00:02:11 +02:00
parent 67931bdeb2
commit a9282bad29

View File

@ -136,8 +136,10 @@ GLFWbool _glfwInitVulkan(void)
void _glfwTerminateVulkan(void) void _glfwTerminateVulkan(void)
{ {
#if !defined(_GLFW_VULKAN_STATIC)
if (_glfw.vk.handle) if (_glfw.vk.handle)
_glfw_dlclose(_glfw.vk.handle); _glfw_dlclose(_glfw.vk.handle);
#endif
} }
const char* _glfwGetVulkanResultString(VkResult result) const char* _glfwGetVulkanResultString(VkResult result)
@ -236,8 +238,10 @@ GLFWAPI GLFWvkproc glfwGetInstanceProcAddress(VkInstance instance,
} }
proc = (GLFWvkproc) vkGetInstanceProcAddr(instance, procname); proc = (GLFWvkproc) vkGetInstanceProcAddr(instance, procname);
#if !defined(_GLFW_VULKAN_STATIC)
if (!proc) if (!proc)
proc = (GLFWvkproc) _glfw_dlsym(_glfw.vk.handle, procname); proc = (GLFWvkproc) _glfw_dlsym(_glfw.vk.handle, procname);
#endif
return proc; return proc;
} }