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

From d86f50463766a47ea73717e29d4199903b06c1c3 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 29 Aug 2024 17:17:24 -0700
Subject: [PATCH] Fix potential cases where we define SDL_GPU_* as an undefined
 symbol

---
 include/build_config/SDL_build_config_windows.h | 8 ++++++--
 include/build_config/SDL_build_config_wingdk.h  | 9 +++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/include/build_config/SDL_build_config_windows.h b/include/build_config/SDL_build_config_windows.h
index 0a7a1b37dce8e..8a6eece1f6702 100644
--- a/include/build_config/SDL_build_config_windows.h
+++ b/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
diff --git a/include/build_config/SDL_build_config_wingdk.h b/include/build_config/SDL_build_config_wingdk.h
index 49eb65c89041e..8a89414d13352 100644
--- a/include/build_config/SDL_build_config_wingdk.h
+++ b/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