Skip to content

Commit

Permalink
implement SDL_Vulkan_GetInstanceExtensions() after SDL3 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Jan 8, 2023
1 parent 24b9470 commit b75edbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/sdl2_compat.c
Expand Up @@ -3466,6 +3466,14 @@ SDL_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture,
return SDL3_RenderTextureRotated(renderer, texture, srcrect, pdstfrect, angle, pfcenter, flip);
}

/* SDL3 removed window parameter from SDL_Vulkan_GetInstanceExtensions() */
DECLSPEC SDL_bool SDLCALL
SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, unsigned int *pCount, const char **pNames)
{
(void) window;
return SDL3_Vulkan_GetInstanceExtensions(pCount, pNames);
}


/* SDL3 doesn't have 3dNow. */
#if defined(__GNUC__) && defined(__i386__)
Expand Down
2 changes: 1 addition & 1 deletion src/sdl3_syms.h
Expand Up @@ -610,7 +610,7 @@ SDL3_SYM_PASSTHROUGH(SDL_Surface*,DuplicateSurface,(SDL_Surface *a),(a),return)
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_PASSTHROUGH(SDL_bool,Vulkan_GetInstanceExtensions,(SDL_Window *a, unsigned int *b, const char **c),(a,b,c),return)
SDL3_SYM(SDL_bool,Vulkan_GetInstanceExtensions,(unsigned int *b, const char **c),(a,b,c),return)
SDL3_SYM_PASSTHROUGH(SDL_bool,Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, VkSurfaceKHR *c),(a,b,c),return)
SDL3_SYM_PASSTHROUGH(void,Vulkan_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
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),)
Expand Down

0 comments on commit b75edbb

Please sign in to comment.