SDL
SDL copied to clipboard
Fix `SDL_LEAN_AND_MEAN` logic
Currently, config flag macros depending on SDL_LEAN_AND_MEAN are always defined, regardless of its value, and only their definedness is checked, not their own values. Those changes fixes this.
See 387774ab8a32151d12f3e76653d5b5bc070a28ce Fixes #11344
While looking for other issues similar to this, I noticed:
- Some config flag macros are conditionally defined, but may still not be true, e.g.: https://github.com/libsdl-org/SDL/blob/802686699449289109f58b9ec4e6200f061e9dd2/include/SDL3/SDL_platform_defines.h#L363-L374
- Third-parties sometimes always define the config flag, but either as true or false, e.g. the OpenGL/Vulkan headers, or even compiler flags: https://github.com/libsdl-org/SDL/blob/802686699449289109f58b9ec4e6200f061e9dd2/include/SDL3/SDL_platform_defines.h#L165-L186
It might be better to always check that config flag macros are defined and true.