From 93d8163a7aec47a98c378a5007dda34735013ccf Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Thu, 19 Dec 2024 11:52:16 -0500 Subject: [PATCH] For SDL3, alias Vulkan override to SDL_GPU --- src/FNA3D.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/FNA3D.c b/src/FNA3D.c index 17e890ac..95fd5a92 100644 --- a/src/FNA3D.c +++ b/src/FNA3D.c @@ -151,6 +151,18 @@ uint32_t FNA3D_PrepareWindowAttributes(void) uint32_t result = 0; uint32_t i; const char *hint = SDL_GetHint("FNA3D_FORCE_DRIVER"); + + /* We used to have our own Vulkan renderer, but that work is now in SDL + * instead. For maximum compatibility, alias this to SDL_GPU! + * -flibit + */ +#ifdef USE_SDL3 + if ((hint != NULL) && (SDL_strcasecmp(hint, "Vulkan") == 0)) + { + hint = "SDLGPU"; + } +#endif + for (i = 0; drivers[i] != NULL; i += 1) { if (hint != NULL)