sdl2-compat: Updated with SDL3's SDL_Vulkan_CreateSurface return value type change.

From 96e65f381410c4748dbee8159d81451a2eeec5df Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 27 Jun 2024 00:05:49 -0400
Subject: [PATCH] Updated with SDL3's SDL_Vulkan_CreateSurface return value
 type change.

---
 src/sdl2_compat.c | 3 ++-
 src/sdl3_syms.h   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index c80a329..4840793 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -6329,10 +6329,11 @@ SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, unsigned int *puiCount, con
 }
 
 /* SDL3 added a VkAllocationCallbacks* argument; SDL2 always uses the default (NULL) allocator */
+/* SDL3 also changed the return type from SDL_bool to int (with usual 0==success, -1==error semantics) */
 SDL_DECLSPEC SDL_bool SDLCALL
 SDL_Vulkan_CreateSurface(SDL_Window *window, VkInstance vkinst, VkSurfaceKHR *psurf)
 {
-    return SDL3_Vulkan_CreateSurface(window, vkinst, NULL, psurf);
+    return (SDL3_Vulkan_CreateSurface(window, vkinst, NULL, psurf) == 0) ? SDL_TRUE : SDL_FALSE;
 }
 
 
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index e96dff4..a6d54ae 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -552,7 +552,7 @@ SDL3_SYM_PASSTHROUGH(int,Vulkan_LoadLibrary,(const char *a),(a),return)
 SDL3_SYM_PASSTHROUGH(void*,Vulkan_GetVkGetInstanceProcAddr,(void),(),return)
 SDL3_SYM_PASSTHROUGH(void,Vulkan_UnloadLibrary,(void),(),)
 SDL3_SYM(char const* const* ,Vulkan_GetInstanceExtensions,(Uint32 *a),(a),return)
-SDL3_SYM(SDL_bool,Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, const struct VkAllocationCallbacks *c, VkSurfaceKHR *d),(a,b,c,d),return)
+SDL3_SYM(int,Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, const struct VkAllocationCallbacks *c, VkSurfaceKHR *d),(a,b,c,d),return)
 SDL3_SYM_PASSTHROUGH(void,GetMemoryFunctions,(SDL_malloc_func *a, SDL_calloc_func *b, SDL_realloc_func *c, SDL_free_func *d),(a,b,c,d),)
 SDL3_SYM_PASSTHROUGH(int,SetMemoryFunctions,(SDL_malloc_func a, SDL_calloc_func b, SDL_realloc_func c, SDL_free_func d),(a,b,c,d),return)
 SDL3_SYM_PASSTHROUGH(void,GetOriginalMemoryFunctions,(SDL_malloc_func *a, SDL_calloc_func *b, SDL_realloc_func *c, SDL_free_func *d),(a,b,c,d),)