Man page - sdl_shouldinit(3)

Packages contains this manual

Manual

SDL_ShouldInit

NAME
HEADER FILE
SYNOPSIS
DESCRIPTION
FUNCTION PARAMETERS
RETURN VALUE
THREAD SAFETY
AVAILABILITY
SEE ALSO

NAME

SDL_ShouldInit - 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)