diff options
author | David Robillard <d@drobilla.net> | 2023-01-14 15:21:36 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-14 16:18:27 -0500 |
commit | 64131038a4f0c3e3f5f5b95e083f0320a68de058 (patch) | |
tree | 1a94a4e1811495d746a16c038be0d1e0e345f622 /src/x11_vulkan.c | |
parent | e8dc1d219f4b461f29e11ad8fe0e463c6dfdb08b (diff) | |
download | pugl-64131038a4f0c3e3f5f5b95e083f0320a68de058.tar.gz pugl-64131038a4f0c3e3f5f5b95e083f0320a68de058.tar.bz2 pugl-64131038a4f0c3e3f5f5b95e083f0320a68de058.zip |
Allow applications to specify the Vulkan library path
I don't know if vendoring the Vulkan library is appropriate, but regardless,
this allows applications to set the name to whatever they want, or specify an
absolute path, just in case the standard value baked into Pugl isn't the right
one in some situation.
Diffstat (limited to 'src/x11_vulkan.c')
-rw-r--r-- | src/x11_vulkan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/x11_vulkan.c b/src/x11_vulkan.c index 54b1218..834ac37 100644 --- a/src/x11_vulkan.c +++ b/src/x11_vulkan.c @@ -26,9 +26,11 @@ struct PuglVulkanLoaderImpl { }; PuglVulkanLoader* -puglNewVulkanLoader(PuglWorld* PUGL_UNUSED(world)) +puglNewVulkanLoader(PuglWorld* PUGL_UNUSED(world), + const char* const libraryName) { - void* const libvulkan = dlopen("libvulkan.so", RTLD_LAZY); + const char* const filename = libraryName ? libraryName : "libvulkan.so"; + void* const libvulkan = dlopen(filename, RTLD_LAZY); if (!libvulkan) { return NULL; } |