mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
SDL_vulkan.h: undefine VK_DEFINE_HANDLER and VK_DEFINE_NON_DISPATCHABLE_HANDLE
Allows including vulkan.hpp in user code in C++ before SDL_vulkan.h w/o errors.
Fixes: https://github.com/libsdl-org/SDL/issues/11328 .
(cherry picked from commit 149ecffd6f)
This commit is contained in:
parent
5b0e838a74
commit
478dff3585
1 changed files with 4 additions and 0 deletions
|
|
@ -52,6 +52,10 @@ extern "C" {
|
|||
VK_DEFINE_HANDLE(VkInstance)
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
|
||||
|
||||
/* 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 */
|
||||
|
||||
typedef VkInstance SDL_vulkanInstance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue