SDL
2.0
|
#include "./SDL_internal.h"
#include "SDL.h"
#include "SDL_bits.h"
#include "SDL_revision.h"
#include "SDL_assert_c.h"
#include "events/SDL_events_c.h"
#include "haptic/SDL_haptic_c.h"
#include "joystick/SDL_joystick_c.h"
#include "timer/SDL_timer_c.h"
Go to the source code of this file.
Functions | |
static void | SDL_PrivateSubsystemRefCountIncr (Uint32 subsystem) |
static void | SDL_PrivateSubsystemRefCountDecr (Uint32 subsystem) |
static SDL_bool | SDL_PrivateShouldInitSubsystem (Uint32 subsystem) |
static SDL_bool | SDL_PrivateShouldQuitSubsystem (Uint32 subsystem) |
void | SDL_SetMainReady (void) |
int | SDL_InitSubSystem (Uint32 flags) |
int | SDL_Init (Uint32 flags) |
void | SDL_QuitSubSystem (Uint32 flags) |
Uint32 | SDL_WasInit (Uint32 flags) |
void | SDL_Quit (void) |
void | SDL_GetVersion (SDL_version *ver) |
Get the version of SDL that is linked against your program. More... | |
const char * | SDL_GetRevision (void) |
Get the code revision of SDL that is linked against your program. More... | |
int | SDL_GetRevisionNumber (void) |
Get the revision number of SDL that is linked against your program. More... | |
const char * | SDL_GetPlatform () |
Gets the name of the platform. More... | |
Variables | |
static SDL_bool | SDL_MainIsReady = SDL_TRUE |
static SDL_bool | SDL_bInMainQuit = SDL_FALSE |
static Uint8 | SDL_SubsystemRefCount [32] |
const char* SDL_GetPlatform | ( | void | ) |
const char* SDL_GetRevision | ( | void | ) |
Get the code revision of SDL that is linked against your program.
Returns an arbitrary string (a hash value) uniquely identifying the exact revision of the SDL library in use, and is only useful in comparing against other revisions. It is NOT an incrementing number.
Definition at line 381 of file SDL.c.
References SDL_REVISION.
int SDL_GetRevisionNumber | ( | void | ) |
Get the revision number of SDL that is linked against your program.
Returns a number uniquely identifying the exact revision of the SDL library in use. It is an incrementing number based on commits to hg.libsdl.org.
Definition at line 388 of file SDL.c.
References SDL_REVISION_NUMBER.
void SDL_GetVersion | ( | SDL_version * | ver | ) |
Get the version of SDL that is linked against your program.
If you are linking to SDL dynamically, then it is possible that the current version will be different than the version you compiled against. This function returns the current version, while SDL_VERSION() is a macro that tells you what version you compiled with.
This function may be called safely at any time, even before SDL_Init().
Definition at line 374 of file SDL.c.
References SDL_VERSION.
int SDL_Init | ( | Uint32 | flags | ) |
This function initializes the subsystems specified by flags
Definition at line 239 of file SDL.c.
References SDL_InitSubSystem().
int SDL_InitSubSystem | ( | Uint32 | flags | ) |
This function initializes specific SDL subsystems
Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or call SDL_Quit() to force shutdown). If a subsystem is already loaded then this call will increase the ref-count and return.
Definition at line 105 of file SDL.c.
References NULL, SDL_AudioInit, SDL_ClearError, SDL_GameControllerInit(), SDL_HapticInit(), SDL_INIT_AUDIO, SDL_INIT_EVENTS, SDL_INIT_GAMECONTROLLER, SDL_INIT_HAPTIC, SDL_INIT_JOYSTICK, SDL_INIT_TIMER, SDL_INIT_VIDEO, SDL_JoystickInit(), SDL_MainIsReady, SDL_PrivateShouldInitSubsystem(), SDL_PrivateSubsystemRefCountIncr(), SDL_QuitInit(), SDL_SetError, SDL_StartEventLoop(), SDL_TicksInit(), SDL_TimerInit(), and SDL_VideoInit.
Referenced by SDL_Init().
Definition at line 77 of file SDL.c.
References SDL_assert, SDL_FALSE, SDL_MostSignificantBitIndex32(), SDL_SubsystemRefCount, and SDL_TRUE.
Referenced by SDL_InitSubSystem().
Definition at line 86 of file SDL.c.
References SDL_bInMainQuit, SDL_FALSE, SDL_MostSignificantBitIndex32(), SDL_SubsystemRefCount, and SDL_TRUE.
Referenced by SDL_QuitSubSystem().
Definition at line 67 of file SDL.c.
References SDL_MostSignificantBitIndex32(), and SDL_SubsystemRefCount.
Referenced by SDL_QuitSubSystem().
Definition at line 58 of file SDL.c.
References SDL_assert, SDL_MostSignificantBitIndex32(), and SDL_SubsystemRefCount.
Referenced by SDL_InitSubSystem().
This function cleans up all initialized subsystems. You should call it upon all exit conditions.
Definition at line 346 of file SDL.c.
References SDL_AssertionsQuit(), SDL_bInMainQuit, SDL_ClearHints, SDL_FALSE, SDL_INIT_EVERYTHING, SDL_LogResetPriorities, SDL_memset, SDL_QuitSubSystem(), SDL_SubsystemRefCount, SDL_TicksQuit(), and SDL_TRUE.
This function cleans up specific SDL subsystems
Definition at line 245 of file SDL.c.
References SDL_AudioQuit, SDL_GameControllerQuit(), SDL_HapticQuit(), SDL_INIT_AUDIO, SDL_INIT_EVENTS, SDL_INIT_GAMECONTROLLER, SDL_INIT_HAPTIC, SDL_INIT_JOYSTICK, SDL_INIT_TIMER, SDL_INIT_VIDEO, SDL_JoystickQuit(), SDL_PrivateShouldQuitSubsystem(), SDL_PrivateSubsystemRefCountDecr(), SDL_QuitQuit(), SDL_StopEventLoop(), SDL_TimerQuit(), and SDL_VideoQuit.
Referenced by SDL_Quit().
This is called by the real SDL main function to let the rest of the library know that initialization was done properly.
Calling this yourself without knowing what you're doing can cause crashes and hard to diagnose problems with your application.
Definition at line 99 of file SDL.c.
References SDL_MainIsReady, and SDL_TRUE.
This function returns a mask of the specified subsystems which have previously been initialized.
If flags
is 0, it returns a mask of all initialized subsystems.
Definition at line 321 of file SDL.c.
References i, SDL_arraysize, SDL_INIT_EVERYTHING, SDL_min, SDL_MostSignificantBitIndex32(), and SDL_SubsystemRefCount.
Definition at line 53 of file SDL.c.
Referenced by SDL_PrivateShouldQuitSubsystem(), and SDL_Quit().
Definition at line 51 of file SDL.c.
Referenced by SDL_InitSubSystem(), and SDL_SetMainReady().
|
static |
Definition at line 54 of file SDL.c.
Referenced by SDL_PrivateShouldInitSubsystem(), SDL_PrivateShouldQuitSubsystem(), SDL_PrivateSubsystemRefCountDecr(), SDL_PrivateSubsystemRefCountIncr(), SDL_Quit(), and SDL_WasInit().