sdlSetInitialized function

void sdlSetInitialized(
  1. Pointer<SdlInitState> state,
  2. bool initialized
)

Finish an initialization state transition.

This function sets the status of the passed in state to SDL_INIT_STATUS_INITIALIZED or SDL_INIT_STATUS_UNINITIALIZED and allows any threads waiting for the status to proceed.

\param state the initialization state to check. \param initialized the new initialization state.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.1.3.

\sa SDL_ShouldInit \sa SDL_ShouldQuit

extern SDL_DECLSPEC void SDLCALL SDL_SetInitialized(SDL_InitState *state, bool initialized)

Implementation

void sdlSetInitialized(Pointer<SdlInitState> state, bool initialized) {
  final sdlSetInitializedLookupFunction = libSdl3.lookupFunction<
      Void Function(Pointer<SdlInitState> state, Uint8 initialized),
      void Function(
          Pointer<SdlInitState> state, int initialized)>('SDL_SetInitialized');
  return sdlSetInitializedLookupFunction(state, initialized ? 1 : 0);
}