34 #if !SDL_TIMERS_DISABLED
39 #if SDL_VIDEO_DRIVER_WINDOWS
40 extern int SDL_HelperWindowCreate(
void);
41 extern int SDL_HelperWindowDestroy(
void);
46 #ifdef SDL_MAIN_NEEDED
106 SDL_SetError(
"Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
113 #if SDL_VIDEO_DRIVER_WINDOWS
114 if (SDL_HelperWindowCreate() < 0) {
119 #if !SDL_TIMERS_DISABLED
135 #if !SDL_EVENTS_DISABLED
144 return SDL_SetError(
"SDL not built with events support");
150 #if !SDL_TIMERS_DISABLED
158 return SDL_SetError(
"SDL not built with timer support");
164 #if !SDL_VIDEO_DISABLED
172 return SDL_SetError(
"SDL not built with video support");
178 #if !SDL_AUDIO_DISABLED
186 return SDL_SetError(
"SDL not built with audio support");
192 #if !SDL_JOYSTICK_DISABLED
200 return SDL_SetError(
"SDL not built with joystick support");
204 if ((flags & SDL_INIT_GAMECONTROLLER)){
205 #if !SDL_JOYSTICK_DISABLED
213 return SDL_SetError(
"SDL not built with joystick support");
219 #if !SDL_HAPTIC_DISABLED
227 return SDL_SetError(
"SDL not built with haptic (force feedback) support");
244 #if !SDL_JOYSTICK_DISABLED
266 #if !SDL_HAPTIC_DISABLED
275 #if !SDL_AUDIO_DISABLED
284 #if !SDL_VIDEO_DISABLED
296 #if !SDL_TIMERS_DISABLED
305 #if !SDL_EVENTS_DISABLED
330 for (i = 0; i < num_subsystems; ++
i) {
332 initialized |= (1 <<
i);
347 #if SDL_VIDEO_DRIVER_WINDOWS
348 SDL_HelperWindowDestroy();
412 return "MacOS Classic";
424 return "QNX Neutrino";
434 return "PlayStation Portable";
436 return "Unknown (see SDL_platform.h)";
440 #if defined(__WIN32__)
442 #if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
447 _DllMainCRTStartup(
HANDLE hModule,
450 switch (ul_reason_for_call) {
451 case DLL_PROCESS_ATTACH:
452 case DLL_THREAD_ATTACH:
453 case DLL_THREAD_DETACH:
454 case DLL_PROCESS_DETACH:
DECLSPEC const char *SDLCALL SDL_GetRevision(void)
Get the code revision of SDL that is linked against your program.
DECLSPEC int SDLCALL SDL_GetRevisionNumber(void)
Get the revision number of SDL that is linked against your program.
static SDL_bool SDL_MainIsReady
DECLSPEC void SDLCALL SDL_VideoQuit(void)
Shuts down the video subsystem.
void SDL_HapticQuit(void)
DECLSPEC void SDL_SetMainReady(void)
#define SDL_INIT_JOYSTICK
static Uint8 SDL_SubsystemRefCount[32]
DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name)
Initialize the video subsystem, optionally specifying a video driver.
DECLSPEC void SDLCALL SDL_GetVersion(SDL_version *ver)
Get the version of SDL that is linked against your program.
int SDL_JoystickInit(void)
int SDL_StartEventLoop(void)
SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
DECLSPEC void SDLCALL SDL_LogResetPriorities(void)
Reset all priorities to default.
#define SDL_INIT_EVERYTHING
DECLSPEC void SDLCALL SDL_Quit(void)
static SDL_bool SDL_bInMainQuit
#define SDL_REVISION_NUMBER
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
uint32_t Uint32
An unsigned 32-bit integer type.
void SDL_AssertionsQuit(void)
DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags)
typedef HANDLE(WINAPI *PFNWGLCREATEBUFFERREGIONARBPROC)(HDC hDC
Information the version of SDL in use.
static void SDL_PrivateSubsystemRefCountIncr(Uint32 subsystem)
void SDL_GameControllerQuit(void)
DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags)
DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len)
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
#define SDL_INIT_GAMECONTROLLER
typedef LPVOID(WINAPI *PFNWGLCREATEIMAGEBUFFERI3DPROC)(HDC hDC
#define SDL_assert(condition)
#define SDL_arraysize(array)
static SDL_bool SDL_PrivateShouldInitSubsystem(Uint32 subsystem)
DECLSPEC void SDLCALL SDL_ClearError(void)
GLenum GLsizei GLsizei GLsizei GLsizei GLbitfield flags
static void SDL_PrivateSubsystemRefCountDecr(Uint32 subsystem)
uint8_t Uint8
An unsigned 8-bit integer type.
typedef DWORD(WINAPI *XInputGetState_t)(DWORD dwUserIndex
DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name)
DECLSPEC int SDLCALL SDL_Init(Uint32 flags)
static SDL_bool SDL_PrivateShouldQuitSubsystem(Uint32 subsystem)
void SDL_JoystickQuit(void)
DECLSPEC void SDLCALL SDL_AudioQuit(void)
int SDL_GameControllerInit(void)
DECLSPEC void SDLCALL SDL_ClearHints(void)
Clear all hints.
void SDL_StopEventLoop(void)
DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags)
typedef BOOL(WINAPI *PFNWGLSETSTEREOEMITTERSTATE3DLPROC)(HDC hDC