Skip to content

Commit

Permalink
Don't define Vulkan types if vulkan.h has already been included
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 28, 2017
1 parent 1f2e151 commit 24a0d3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/SDL_vulkan.h
Expand Up @@ -37,6 +37,7 @@ extern "C" {
#endif

/* Avoid including vulkan.h */
#ifndef VULKAN_H_
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;

#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
Expand All @@ -48,6 +49,8 @@ extern "C" {
VK_DEFINE_HANDLE(VkInstance)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)

#endif /* !VULKAN_H_ */

typedef VkInstance SDL_vulkanInstance;
typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */

Expand Down

0 comments on commit 24a0d3b

Please sign in to comment.