Skip to content

Commit

Permalink
SDL_vulkan.h: undefine VK_DEFINE_HANDLER and VK_DEFINE_NON_DISPATCHAB…
Browse files Browse the repository at this point in the history
…LE_HANDLE

Allows including vulkan.hpp in user code in C++ before SDL_vulkan.h w/o errors.
Fixes:  libsdl-org#11328 .
  • Loading branch information
Dv-Senna authored Oct 29, 2024
1 parent 35e53f7 commit 149ecff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/SDL3/SDL_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ VK_DEFINE_HANDLE(VkPhysicalDevice)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
struct VkAllocationCallbacks;

/* Make sure to undef to avoid issues in case of later vulkan include */
#undef VK_DEFINE_HANDLE
#undef VK_DEFINE_NON_DISPATCHABLE_HANDLE

#endif /* !NO_SDL_VULKAN_TYPEDEFS */

/**
Expand Down

0 comments on commit 149ecff

Please sign in to comment.