From 5383390937ecff7e7a7fe1e3f7d743912239d900 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 11 Oct 2024 18:59:32 -0300 Subject: [PATCH] vulkan: fix initialization when SDL3 is used --- src/modules/graphics/vulkan/Graphics.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index c07433546..f0965ad89 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -102,7 +102,11 @@ static void checkOptionalInstanceExtensions(OptionalInstanceExtensions& ext) Graphics::Graphics() : love::graphics::Graphics("love.graphics.vulkan") { +#if SDL_VERSION_ATLEAST(3, 0, 0) + if (!SDL_Vulkan_LoadLibrary(nullptr)) +#else if (SDL_Vulkan_LoadLibrary(nullptr)) +#endif throw love::Exception("could not find vulkan"); volkInitializeCustom((PFN_vkGetInstanceProcAddr)SDL_Vulkan_GetVkGetInstanceProcAddr());