SDL_windows.h: guard WIN32_LEAN_AND_MEAN and STRICT macro defines.

also define them as 1, instead of empty.
Reference issue: https://github.com/libsdl-org/SDL/issues/6239
main
Ozkan Sezer 2022-09-16 17:28:20 +03:00
parent c23fb235c8
commit 339f7a2f6b
1 changed files with 16 additions and 6 deletions

View File

@ -25,8 +25,12 @@
#define _INCLUDED_WINDOWS_H
#if defined(__WIN32__)
#define WIN32_LEAN_AND_MEAN
#define STRICT
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef STRICT
#define STRICT 1
#endif
#ifndef UNICODE
#define UNICODE 1
#endif
@ -40,9 +44,14 @@
#define _WIN32_WINNT 0x501 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices(), 0x501 for raw input */
#endif
#define WINVER _WIN32_WINNT
#elif defined(__WINGDK__)
#define WIN32_LEAN_AND_MEAN
#define STRICT
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef STRICT
#define STRICT 1
#endif
#ifndef UNICODE
#define UNICODE 1
#endif
@ -50,12 +59,13 @@
#undef _WIN32_WINNT
#define _WIN32_WINNT 0xA00
#define WINVER _WIN32_WINNT
#elif defined(__XBOXONE__) || defined(__XBOXSERIES__)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef STRICT
#define STRICT
#define STRICT 1
#endif
#ifndef UNICODE
#define UNICODE 1