logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

SDL_ShouldInit - Return whether initialization should be done.

Availability

       This function is available since SDL 3.2.0.

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.

Name

       SDL_ShouldInit - Return whether initialization should be done.

Return Value

       Returns true if initialization needs to be done, false otherwise.

See Also

SDL_SetInitialized(3), SDL_ShouldQuit(3)

Simple Directmedia Layer                           SDL 3.2.20                                  SDL_ShouldInit(3)

Synopsis

#include<SDL3/SDL_mutex.h>boolSDL_ShouldInit(SDL_InitState*state);

Thread Safety

       It is safe to call this function from any thread.

See Also