mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-31 04:28:56 +00:00
73fed37c046414206935ad1c5351fc0103f953b3
We don't care _what_ the `sizeof` results are, we just want it to vaporize
the condition's code out of the build. So we check it with a `? 1 : 0`, so it
always boils down to a `sizeof (int)`, no matter what data type the condition
actually is.
This works with bitfields, pointers, anything that can be "truthy." If it
isn't truthy, it would fail when assertions are enabled anyhow.
Fixes #15990.
(manually cherry picked from commit daf519ae05)
Simple DirectMedia Layer (SDL) Version 2.0
Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
More extensive documentation is available in the docs directory, starting with README.md
Enjoy!
Sam Lantinga (slouken@libsdl.org)
Languages
C
87.7%
C++
4.3%
Objective-C
3.4%
CMake
1.7%
Java
0.7%
Other
1.9%