SDL_PLATFORM_EMSCRIPTEN(3)

✨ SDL_PLATFORM_EMSCRIPTEN ✨

okay bestie, welcome to the SDL_PLATFORM_EMSCRIPTEN page from the SDL3 FUNCTIONS manual πŸ’– this one's a little baby page but she's iconic and she matters, so let's give her the main character energy she deserves πŸŽ€


🌸 NAME 🌸

SDL_PLATFORM_EMSCRIPTEN β€” a preprocessor macro that is only defined if you're compiling for Emscripten. that's it. that's the whole vibe. πŸ¦‹


πŸ’… SYNOPSIS πŸ’…

#include <SDL3/SDL_platform_defines.h>

#define SDL_PLATFORM_EMSCRIPTEN 1

so you pull in the header, and the macro itself is just literally defined as 1. no arguments, no drama, no notes. periodt. ✨


🫢 AVAILABILITY 🫢

this macro has been around since SDL 3.2.0 β€” so if you're on anything older, she's not there yet, no cap. 😭


πŸŽ€ reminder bestie: this is a preprocessor macro, so it's checked at compile time, not runtime. if you're not building for Emscripten, the macro simply won't exist β€” so wrap anything that depends on her in a check, iykyk πŸ’œ

and that's the whole page, you ate that πŸ“ go forth and compile for the web, my little emscripten queen πŸ‘‘

this adorable lil page comes to you from Simple Directmedia Layer, living in SDL 3.4.18 β€” mwah, catch you on the next manpage πŸ’–πŸŒˆ

πŸ“¦ where this page comes from