|
@@ -25,6 +25,12 @@
|
|
|
|
|
|
#include "SDL_platform.h"
|
|
|
|
|
|
+/* winsdkver.h defines _WIN32_MAXVER for SDK version detection. It is present since at least the Windows 7 SDK.
|
|
|
+ * Define NO_WINSDKVER_H if your SDK version doesn't provide this, or use CMake which can detect it automatically. */
|
|
|
+#ifndef NO_WINSDKVER_H
|
|
|
+#include <winsdkver.h>
|
|
|
+#endif
|
|
|
+
|
|
|
/* This is a set of defines to configure the SDL features */
|
|
|
|
|
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
|
@@ -82,6 +88,12 @@ typedef unsigned int uintptr_t;
|
|
|
#define HAVE_DSOUND_H 1
|
|
|
#define HAVE_DXGI_H 1
|
|
|
#define HAVE_XINPUT_H 1
|
|
|
+#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0A00 /* Windows 10 SDK */
|
|
|
+#define HAVE_WINDOWS_GAMING_INPUT_H 1
|
|
|
+#endif
|
|
|
+#if defined(_WIN32_MAXVER) && _WIN32_MAXVER >= 0x0601 /* Windows 7 SDK */
|
|
|
+#define HAVE_D3D11_H 1
|
|
|
+#endif
|
|
|
#define HAVE_MMDEVICEAPI_H 1
|
|
|
#define HAVE_AUDIOCLIENT_H 1
|
|
|
#define HAVE_SENSORSAPI_H 1
|
|
@@ -201,20 +213,6 @@ typedef unsigned int uintptr_t;
|
|
|
#define HAVE_STDDEF_H 1
|
|
|
#endif
|
|
|
|
|
|
-/* Check to see if we have Windows 10 build environment */
|
|
|
-#if defined(_MSC_VER) && (_MSC_VER >= 1911) /* Visual Studio 15.3 */
|
|
|
-#include <sdkddkver.h>
|
|
|
-#if _WIN32_WINNT >= 0x0601 /* Windows 7 */
|
|
|
-#define SDL_WINDOWS7_SDK
|
|
|
-#endif
|
|
|
-#if _WIN32_WINNT >= 0x0602 /* Windows 8 */
|
|
|
-#define SDL_WINDOWS8_SDK
|
|
|
-#endif
|
|
|
-#if _WIN32_WINNT >= 0x0A00 /* Windows 10 */
|
|
|
-#define SDL_WINDOWS10_SDK
|
|
|
-#endif
|
|
|
-#endif /* _MSC_VER >= 1911 */
|
|
|
-
|
|
|
/* Enable various audio drivers */
|
|
|
#define SDL_AUDIO_DRIVER_WASAPI 1
|
|
|
#define SDL_AUDIO_DRIVER_DSOUND 1
|
|
@@ -229,7 +227,7 @@ typedef unsigned int uintptr_t;
|
|
|
#define SDL_JOYSTICK_RAWINPUT 1
|
|
|
#endif
|
|
|
#define SDL_JOYSTICK_VIRTUAL 1
|
|
|
-#ifdef SDL_WINDOWS10_SDK
|
|
|
+#ifdef HAVE_WINDOWS_GAMING_INPUT_H
|
|
|
#define SDL_JOYSTICK_WGI 1
|
|
|
#endif
|
|
|
#define SDL_JOYSTICK_XINPUT 1
|
|
@@ -256,7 +254,7 @@ typedef unsigned int uintptr_t;
|
|
|
#ifndef SDL_VIDEO_RENDER_D3D
|
|
|
#define SDL_VIDEO_RENDER_D3D 1
|
|
|
#endif
|
|
|
-#ifdef SDL_WINDOWS7_SDK
|
|
|
+#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
|
|
|
#define SDL_VIDEO_RENDER_D3D11 1
|
|
|
#endif
|
|
|
|