SDL: VC+d3d12: use __has_include to detect presence of d3d12 ehaders (6c297)

From 6c297788262f766745f0195673de4d67ff463af2 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Mon, 27 May 2024 02:42:04 +0200
Subject: [PATCH] VC+d3d12: use __has_include to detect presence of d3d12
 ehaders

backport of 4fa50062472795234806e89eccf1fcebbab3407a
---
 include/SDL_config_windows.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
index dba78086016e4..aae52ebc63de3 100644
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -99,9 +99,11 @@ typedef unsigned int uintptr_t;
 #define HAVE_D3D11_H 1
 #define HAVE_ROAPI_H 1
 #endif
-#if defined(WDK_NTDDI_VERSION) && WDK_NTDDI_VERSION > 0x0A000008 /* 10.0.19041.0 */
+#if defined(__has_include)
+#if __has_include(<d3d12.h>) && __has_include(<d3d12sdklayers.h>)
 #define HAVE_D3D12_H 1
 #endif
+#endif
 #if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0603  /* Windows 8.1 SDK */
 #define HAVE_SHELLSCALINGAPI_H 1
 #endif