windowsdialog: Fix broken ≤XP fallback declarations

The syntax errors in the enum lists tell us that no one ever actually
compiled this `WINVER < _WIN32_WINNT_VISTA` fallback path. 2f5bc17 made
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 that 2f5bc17
targeted, 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.
This commit is contained in:
nmlgc
2025-10-13 08:20:38 +02:00
committed by Sam Lantinga
parent 79dae1b9d6
commit 5e1a753f88

View File

@@ -38,52 +38,25 @@ typedef struct _COMDLG_FILTERSPEC
typedef enum FDE_OVERWRITE_RESPONSE
{
FDEOR_DEFAULT
FDEOR_ACCEPT
FDEOR_REFUSE
FDEOR_DEFAULT,
FDEOR_ACCEPT,
FDEOR_REFUSE,
} FDE_OVERWRITE_RESPONSE;
typedef enum FDE_SHAREVIOLATION_RESPONSE
{
FDESVR_DEFAULT
FDESVR_ACCEPT
FDESVR_REFUSE
FDESVR_DEFAULT,
FDESVR_ACCEPT,
FDESVR_REFUSE,
} FDE_SHAREVIOLATION_RESPONSE;
typedef enum FDAP
{
FDAP_BOTTOM
FDAP_TOP
FDAP_BOTTOM,
FDAP_TOP,
} FDAP;
typedef ULONG SFGAOF;
typedef enum GETPROPERTYSTOREFLAGS
{
GPS_DEFAULT = 0x0,
GPS_HANDLERPROPERTIESONLY = 0x1,
GPS_READWRITE = 0x2,
GPS_TEMPORARY = 0x4,
GPS_FASTPROPERTIESONLY = 0x8,
GPS_OPENSLOWITEM = 0x10,
GPS_DELAYCREATION = 0x20,
GPS_BESTEFFORT = 0x40,
GPS_NO_OPLOCK = 0x80,
GPS_PREFERQUERYPROPERTIES = 0x100,
GPS_EXTRINSICPROPERTIES = 0x200,
GPS_EXTRINSICPROPERTIESONLY = 0x400,
GPS_VOLATILEPROPERTIES = 0x800,
GPS_VOLATILEPROPERTIESONLY = 0x1000,
GPS_MASK_VALID = 0x1FFF
} GETPROPERTYSTOREFLAGS;
typedef struct _tagpropertykey {
GUID fmtid;
DWORD pid;
} PROPERTYKEY;
#define REFPROPERTYKEY const PROPERTYKEY * const
typedef DWORD SHCONTF;
#endif // WINVER < _WIN32_WINNT_VISTA