mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-13 15:13:54 +00:00
The syntax errors in the enum lists tell us that no one ever actually compiled this `WINVER < _WIN32_WINNT_VISTA` fallback path.2f5bc17made it increasingly unlikely for retro Windows builds to hit this path by adding a new set of `WINVER` override rules to `SDL_windows.h` that check for the presence of certain headers. `HAVE_MMDEVICEAPI_H` in particular will be `#define`d for any CMake build with a ≥Vista-era SDK, such as Visual Studio 2017's `v141_xp` toolset that2f5bc17targeted, and it's also unconditionally defined in the default `SDL_build_config_windows.h` configuration used by the ready-made Visual Studio project. These fixes work for a XP-era configuration that undefines all of the `HAVE_*_H` macros and `SDL_VIDEO_RENDER_D3D12` to make `SDL_windows.h` fall through to the `#define _WIN32_WINNT _WIN32_WINNT_WINXP` case, on both Visual Studio 2022 and Visual Studio 2017's `v141_xp` toolset.