Fix MoltenVK Loading on macOS

Loading Vulkan fails on macOS even if the user has libMoltenVK.dylib. This is because it tries to load libvulkan.1.dylib, not libMoltenVK.dylib.
This commit is contained in:
GameParrot 2022-07-08 21:57:23 -04:00 committed by GitHub
parent 36f0bf00a9
commit 3cbaf61936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ GLFWbool _glfwInitVulkan(int mode)
#elif defined(_GLFW_WIN32)
_glfw.vk.handle = _glfwPlatformLoadModule("vulkan-1.dll");
#elif defined(_GLFW_COCOA)
_glfw.vk.handle = _glfwPlatformLoadModule("libvulkan.1.dylib");
_glfw.vk.handle = _glfwPlatformLoadModule("libMoltenVK.dylib");
if (!_glfw.vk.handle)
_glfw.vk.handle = _glfwLoadLocalVulkanLoaderCocoa();
#elif defined(__OpenBSD__) || defined(__NetBSD__)