From 24a0d3bc6d16e1041d92f82dec5387a24a859420 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 27 Aug 2017 22:27:45 -0700 Subject: [PATCH] Don't define Vulkan types if vulkan.h has already been included --- include/SDL_vulkan.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/SDL_vulkan.h b/include/SDL_vulkan.h index f7b51915b..d56c3d8a3 100644 --- a/include/SDL_vulkan.h +++ b/include/SDL_vulkan.h @@ -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__) @@ -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 */