SDL_PLATFORM_MACOS(3)
π SDL_PLATFORM_MACOS π
okay bestie, so this is a page from the SDL3 FUNCTIONS manual, and honestly? it's a tiny one but it's iconic. let's get into it π
β¨ NAME β¨
SDL_PLATFORM_MACOS β a preprocessor macro that is only defined if you're compiling for macOS. that's it. that's the whole vibe. π
like, if you're building on a Mac, this little guy shows up. if you're not? he's not there. no cap.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_platform_defines.h>
#define SDL_PLATFORM_MACOS 1
so you pull in the header, and the macro is set to 1. simple, clean, ate. π¦
β AVAILABILITY β
this macro has been around since SDL 3.2.0. so if you're on something older than that... bestie, upgrade π
π SEE ALSO π
SDL_PLATFORM_APPLE(3)β the sibling macro, go say hi π«Ά
fr fr, if you're doing platform-specific #ifdef stuff, this is the one you wanna check. don't be out here guessing whether you're on macOS when the macro will literally just tell you. periodt. π
and that's the whole page! this beauty came from the Simple Directmedia Layer crew, SDL 3.4.18 era, and it's filed under SDL_PLATFORM_MACOS(3). mwah πβ¨
π¦ 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