SDL_VERSION(3)
π SDL_VERSION π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_VERSION β literally the version number macro for the current SDL version. that's it, that's the whole vibe. she's small, she's iconic, she's giving build-time truth serum β¨
πΈ NAME πΈ
SDL_VERSION β the version number macro for the current SDL version π
β¨ SYNOPSIS β¨
lowkey the whole thing is two lines, no cap:
#include <SDL3/SDL_version.h>
#define SDL_VERSION \
SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION)
see how she just glues SDL_MAJOR_VERSION, SDL_MINOR_VERSION and SDL_MICRO_VERSION together through SDL_VERSIONNUM? that's the whole trick, fr fr π
π§΅ THREAD SAFETY π§΅
good news, bestie: it is safe to call this macro from any thread. every single one. go wild, no locks needed, she's not that kind of girl π¦
π AVAILABILITY π
this macro has been around since SDL 3.2.0. vintage-ish but not ancient, yk? π
π SEE ALSO π
SDL_GetVersion(3)β your other bestie, the runtime one, iykyk π
and that's the page!! this lil beauty lives in the Simple Directmedia Layer manual, documented as SDL 3.4.18, and she's filed under SDL_VERSION(3). mwah, go compile something cute πππ«Ά
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms