SDL_PLATFORM_WINDOWS(3)
π SDL_PLATFORM_WINDOWS π
okay bestie, welcome to the SDL_PLATFORM_WINDOWS page from the SDL3 functions crew, we're gonna get you fluent in this macro in like thirty seconds, no cap π«Ά
β¨ NAME β¨
SDL_PLATFORM_WINDOWS β it's a preprocessor macro, and the way it works is so simple: it only exists (only gets defined, periodt) if you're compiling for Windows. that's it. that's the whole vibe check π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_platform_defines.h>
#define SDL_PLATFORM_WINDOWS 1
look at her. iconic. she's just sitting there in the header file waiting for you to #ifdef her π
π¦ DESCRIPTION π¦
so here's the tea: this macro isn't just for "Windows" Windows, okay? she's a big umbrella energy kind of girl. she also covers several other platforms, like Microsoft GDK, Xbox, WinRT, etc. π
and listen β each of those will have their own more-specific platform macros too, so if you need to get granular, the specific ones are right there. SDL_PLATFORM_WINDOWS is the "yes we're in the Windows family" check, not the "which exact flavor of Windows family" check. iykyk β¨
π AVAILABILITY π
this macro is available since SDL 3.2.0. so if you're on something older, sorry babe, she's not there yet π
π SEE ALSO π
go read these next, bestie, they're her siblings and they're all serving:
SDL_PLATFORM_WIN32(3)SDL_PLATFORM_XBOXONE(3)SDL_PLATFORM_XBOXSERIES(3)SDL_PLATFORM_WINGDK(3)SDL_PLATFORM_GDK(3)
π friendly reminder: this is a preprocessor macro, so it does its thing at compile time, not at runtime. vibe check your build target before you ship, fr fr π
Simple Directmedia Layer came through with this one, and this page is from SDL 3.4.18 β yeah, she's got the SDL_PLATFORM_WINDOWS(3) energy through and through. 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