mirror of
https://github.com/glfw/glfw.git
synced 2025-06-14 19:52:14 +00:00
Fix macOS libvulkan.1.dylib loading
This commit is contained in:
parent
62e175ef9f
commit
152ccf560d
@ -460,11 +460,18 @@ void* _glfwLoadLocalVulkanLoaderCocoa(void)
|
||||
if (!bundle)
|
||||
return NULL;
|
||||
|
||||
CFURLRef url =
|
||||
CFBundleCopyAuxiliaryExecutableURL(bundle, CFSTR("libvulkan.1.dylib"));
|
||||
if (!url)
|
||||
CFURLRef frameworksUrl = CFBundleCopyPrivateFrameworksURL(bundle);
|
||||
if (!frameworksUrl)
|
||||
return NULL;
|
||||
|
||||
CFURLRef url = CFURLCreateCopyAppendingPathComponent(
|
||||
kCFAllocatorDefault, frameworksUrl, CFSTR("libvulkan.1.dylib"), false);
|
||||
if (!url)
|
||||
{
|
||||
CFRelease(frameworksUrl);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char path[PATH_MAX];
|
||||
void* handle = NULL;
|
||||
|
||||
@ -472,6 +479,7 @@ void* _glfwLoadLocalVulkanLoaderCocoa(void)
|
||||
handle = _glfwPlatformLoadModule(path);
|
||||
|
||||
CFRelease(url);
|
||||
CFRelease(frameworksUrl);
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user