Return whether initialization should be done.
Defined in <SDL3/SDL_mutex.h>
bool SDL_ShouldInit(SDL_InitState *state);
SDL_InitState * | state | the initialization state to check. |
(bool) Returns true if initialization needs to be done, false otherwise.
This function checks the passed in state and if initialization should be done, sets the status to SDL_INIT_STATUS_INITIALIZING
and returns true. If another thread is already modifying this state, it will wait until that's done before returning.
If this function returns true, the calling code must call SDL_SetInitialized() to complete the initialization.
It is safe to call this function from any thread.
This function is available since SDL 3.1.3.