get_initialized


Description:

[ CCode ( cname = "SDL_WasInit" ) ]
public uint32 get_initialized (uint32 flags)

Use this function to return a mask of the specified subsystems which have previously been initialized.

Examples:

// Get init data on all the subsystems
uint32 subsystem_init = SDL.get_initialized (SDL.InitFlag.EVERYTHING);
if (subsystem_init & SDL.InitFlag.VIDEO)
//Video is initialized
// Just check for one specific subsystem
if (SDL.get_initialized (SDL.InitFlag.VIDEO) != 0)
//Video is initialized
// Check for two subsystems
uint32 mask = SDL.InitFlag.VIDEO | SDL.InitFlag.AUDIO;
if (SDL.get_initialized (mask) == mask)
//Video and Audio is initialized

Parameters:

flags

any of the flags used by SDL.init.

Returns:

If flags is 0 it returns a mask of all initialized subsystems, otherwise it returns the initialization status of the specified subsystems. The return value does not include SDL.InitFlag.NOPARACHUTE .


Namespace: SDL
Package: sdl2



2022 vala-language.org