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
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 52
diff --git a/src/core/windows/SDL_windows.h b/src/core/windows/SDL_windows.h
index 5c1d634..8b124d7 100644
--- a/src/core/windows/SDL_windows.h
+++ b/src/core/windows/SDL_windows.h
@@ -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