Skip to content

Commit

Permalink
SDL_windows.h: guard WIN32_LEAN_AND_MEAN and STRICT macro defines.
Browse files Browse the repository at this point in the history
also define them as 1, instead of empty.
Reference issue: #6239
  • Loading branch information
sezero authored and pull[bot] committed Sep 30, 2022
1 parent fa0868e commit 1868946
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/core/windows/SDL_windows.h
Expand Up @@ -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
Expand All @@ -40,22 +44,28 @@
#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
#undef WINVER
#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
Expand Down

0 comments on commit 1868946

Please sign in to comment.