SDL_ShouldInit - Man Page
Return whether initialization should be done.
Header File
Defined in SDL3/SDL_mutex.h
Synopsis
#include "SDL3/SDL.h" bool SDL_ShouldInit(SDL_InitState *state);
Description
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.
Function Parameters
- state
the initialization state to check.
Return Value
Returns true if initialization needs to be done, false otherwise.
Thread Safety
It is safe to call this function from any thread.
Availability
This function is available since SDL 3.2.0.
See Also
·(3), SDL_SetInitialized(3), ·(3), SDL_ShouldQuit(3)
Referenced By
SDL_SetInitialized(3), SDL_ShouldQuit(3).
SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS