SDL_PLATFORM_XBOXONE(3)

๐Ÿ’– SDL_PLATFORM_XBOXONE ๐Ÿ’–

okay so bestie, this is a page from the SDL3 FUNCTIONS collection, and the whole thing is literally one tiny preprocessor macro. it's giving "short but iconic." ๐ŸŽ€


โœจ NAME โœจ

SDL_PLATFORM_XBOXONE โ€” a preprocessor macro that is only defined if you're compiling for Xbox One. no cap. that's it. that's the whole vibe. ๐ŸŽฎ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <SDL3/SDL_platform_defines.h>

#define SDL_PLATFORM_XBOXONE 1

like, you don't call it, you don't pass it anything, it's just... there. existing. slaying. โœจ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so the way that this works is: SDL_PLATFORM_XBOXONE is a preprocessor macro, and it is only defined when you're compiling for Xbox One. that's the entire personality. ๐Ÿซถ

if you're not building for Xbox One, this macro is just not gonna show up โ€” so like, don't go assuming it exists, because it will not come to your party. #ifdef it, bestie, or get humbled. ๐Ÿ˜ญ

it lives in <SDL3/SDL_platform_defines.h>, and when it is defined, it's defined as 1. so a vibe check like #ifdef SDL_PLATFORM_XBOXONE is the move. ๐Ÿ”ฅ


๐Ÿ‘‘ AVAILABILITY ๐Ÿ‘‘

this macro has been available since SDL 3.2.0. so if you're on something older than that, no Xbox One macro for you, sorry not sorry. ๐Ÿ™ˆ


lowkey a reminder that preprocessor macros are all-or-nothing โ€” either the macro is defined or it isn't. there's no in-between, no "sort of defined," none of that. it's binary, periodt. ๐Ÿ’€

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

there's no SEE ALSO section in this one, bestie. it's a one-macro page. we keep it minimal. minimal is a vibe. โญ


okay that's the whole page!! mwah ๐Ÿ’–

this lil cutie is brought to you by Simple Directmedia Layer โ€” SDL 3.4.18, and yes she's from the SDL3 FUNCTIONS era, signed, sealed, documented. go forth and #ifdef responsibly, my love. ๐Ÿงš๐Ÿ“๐Ÿ’œ

๐Ÿ“ฆ where this page comes from