فهرست منبع

Fix potential cases where we define SDL_GPU_* as an undefined symbol

Sam Lantinga 7 ماه پیش
والد
کامیت
d86f504637
2فایلهای تغییر یافته به همراه13 افزوده شده و 4 حذف شده
  1. 6 2
      include/build_config/SDL_build_config_windows.h
  2. 7 2
      include/build_config/SDL_build_config_wingdk.h

+ 6 - 2
include/build_config/SDL_build_config_windows.h

@@ -310,11 +310,15 @@ typedef unsigned int uintptr_t;
 /* Enable Vulkan support */
 #define SDL_VIDEO_VULKAN 1
 
-#define SDL_GPU_D3D11 HAVE_D3D11_H
+#if !defined(SDL_GPU_D3D11) && defined(HAVE_D3D11_H)
+#define SDL_GPU_D3D11 1
+#endif
 #if !defined(SDL_GPU_D3D12)
 #define SDL_GPU_D3D12 1
 #endif
-#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
+#if !defined(SDL_GPU_VULKAN) && defined(SDL_VIDEO_VULKAN)
+#define SDL_GPU_VULKAN 1
+#endif
 
 #ifndef SDL_VIDEO_RENDER_VULKAN
 #define SDL_VIDEO_RENDER_VULKAN    1

+ 7 - 2
include/build_config/SDL_build_config_wingdk.h

@@ -232,11 +232,16 @@
 /* Enable Vulkan support */
 #define SDL_VIDEO_VULKAN 1
 
-#define SDL_GPU_D3D11 HAVE_D3D11_H
+
+#if !defined(SDL_GPU_D3D11) && defined(HAVE_D3D11_H)
+#define SDL_GPU_D3D11 1
+#endif
 #if !defined(SDL_GPU_D3D12)
 #define SDL_GPU_D3D12 1
 #endif
-#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
+#if !defined(SDL_GPU_VULKAN) && defined(SDL_VIDEO_VULKAN)
+#define SDL_GPU_VULKAN 1
+#endif
 
 /* Enable system power support */
 #define SDL_POWER_WINDOWS 1