Added additional check for HAVE_D3D12_H and missing SDL_VIDEO_RENDER_D3D12 in SDL_config.h.cmake
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4178966..34f308c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1594,6 +1594,8 @@ elseif(WINDOWS)
check_c_source_compiles("
#include <winsdkver.h>
#include <sdkddkver.h>
+ #include <d3d12.h>
+ ID3D12Device5 *device;
#if WDK_NTDDI_VERSION > 0x0A000008
int main(int argc, char **argv) { return 0; }
#endif" HAVE_D3D12_H)
diff --git a/configure b/configure
index 3f51589..cd6346c 100755
--- a/configure
+++ b/configure
@@ -25090,6 +25090,8 @@ $as_echo_n "checking for d3d12 Windows SDK version... " >&6; }
#include <winsdkver.h>
#include <sdkddkver.h>
+#include <d3d12.h>
+ID3D12Device5 *device;
#if WDK_NTDDI_VERSION <= 0x0A000008
asdf
#endif
diff --git a/configure.ac b/configure.ac
index 9a9248b..04f8a04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3268,6 +3268,8 @@ CheckDIRECTX()
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <winsdkver.h>
#include <sdkddkver.h>
+#include <d3d12.h>
+ID3D12Device5 *device;
#if WDK_NTDDI_VERSION <= 0x0A000008
asdf
#endif
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index b6b5839..3f17d13 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -440,6 +440,7 @@
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
+#cmakedefine SDL_VIDEO_RENDER_D3D12 @SDL_VIDEO_RENDER_D3D12@
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@