mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Cocoa: Cleanup
This commit is contained in:
parent
78b19548d9
commit
2db528d8cd
@ -464,9 +464,9 @@ void* _glfwLoadLocalVulkanLoaderCocoa(void)
|
|||||||
if (!frameworksUrl)
|
if (!frameworksUrl)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
CFURLRef url = CFURLCreateCopyAppendingPathComponent(
|
CFURLRef loaderUrl = CFURLCreateCopyAppendingPathComponent(
|
||||||
kCFAllocatorDefault, frameworksUrl, CFSTR("libvulkan.1.dylib"), false);
|
kCFAllocatorDefault, frameworksUrl, CFSTR("libvulkan.1.dylib"), false);
|
||||||
if (!url)
|
if (!loaderUrl)
|
||||||
{
|
{
|
||||||
CFRelease(frameworksUrl);
|
CFRelease(frameworksUrl);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -475,10 +475,10 @@ void* _glfwLoadLocalVulkanLoaderCocoa(void)
|
|||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
void* handle = NULL;
|
void* handle = NULL;
|
||||||
|
|
||||||
if (CFURLGetFileSystemRepresentation(url, true, (UInt8*) path, sizeof(path) - 1))
|
if (CFURLGetFileSystemRepresentation(loaderUrl, true, (UInt8*) path, sizeof(path) - 1))
|
||||||
handle = _glfwPlatformLoadModule(path);
|
handle = _glfwPlatformLoadModule(path);
|
||||||
|
|
||||||
CFRelease(url);
|
CFRelease(loaderUrl);
|
||||||
CFRelease(frameworksUrl);
|
CFRelease(frameworksUrl);
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user