SDL_SetInitialized(3)
π SDL_SetInitialized β the glow-up moment for your init state π
okay bestie, welcome to the SDL3 manual, and specifically to SDL_SetInitialized(3), which lives in the SDL3 FUNCTIONS section. this one is short but she is important, so let's get into it π«Ά
β¨ NAME β¨
SDL_SetInitialized β finish an initialization state transition. like, the transition? done. wrapped. periodt. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_mutex.h>
void SDL_SetInitialized(SDL_InitState *state, bool initialized);
no return value, no drama, just vibes and a state change β¨
π¦ DESCRIPTION π¦
so here's the tea π β this function takes the status of the state you passed in and sets it to SDL_INIT_STATUS_INITIALIZED or SDL_INIT_STATUS_UNINITIALIZED. that's it, that's the whole job, and she does it flawlessly.
and the best part? while she's doing that, she allows any threads waiting for the status to proceed. so all those lil threads that were just sitting there, waiting for the vibe check to clear? they get to move on. iconic behavior, honestly. π
π FUNCTION PARAMETERS π
stateβ the initialization state to check. this is your lil state object, she's the main character here.initializedβ the new initialization state.true?false? you decide, bestie, it's your world π
π₯ THREAD SAFETY π₯
it is safe to call this function from any thread. any of them. all of them. go off, no cap πβ¨
β AVAILABILITY β
this function is available since SDL 3.2.0. so if you're on something older... yeah, she's not there yet, sorry babe π
π SEE ALSO π
go read those too, they're the sister functions and they ate π
mwah π that's the whole page! brought to you by the lovely folks at Simple Directmedia Layer, running SDL 3.4.18, and yeah this is SDL_SetInitialized(3) signing off. stay initialized, bestie πβ¨π¦
π¦ 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