SDL_VERSION_ATLEAST(3)

πŸ’– SDL_VERSION_ATLEAST πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual β€” this one's about a lil macro called SDL_VERSION_ATLEAST, and honestly? it's giving "am i running new enough SDL or not" and it ate. πŸ¦‹


✨ NAME ✨

SDL_VERSION_ATLEAST β€” this macro will evaluate to true if compiled with SDL at least X.Y.Z. no cap. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_version.h>

#define SDL_VERSION_ATLEAST(X, Y, Z) \
    (SDL_VERSION >= SDL_VERSIONNUM(X, Y, Z))

like, that's the whole thing. <rainbow>iconic</rainbow>. ✨


🫢 THREAD SAFETY 🫢

It is safe to call this macro from any thread. fr fr, go wild, no locks needed, she's chill in every thread. 🧚


πŸ‘‘ AVAILABILITY πŸ‘‘

This macro is available since SDL 3.2.0. so if you're on something older than that... not me finding out the hard way 😭


and that's the whole page, bestie β€” short, sweet, and lowkey perfect. 🌈

this lil tour was brought to you by the Simple Directmedia Layer girlies, running SDL 3.4.18, filed under SDL_VERSION_ATLEAST(3) β€” mwah, go compile something cute πŸ’–πŸŽ€

πŸ“¦ where this page comes from