mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 22:48:30 +00:00
Removed SDL_INIT_TIMER
This is no longer necessary before calling SDL_AddTimer()
This commit is contained in:
23
src/SDL.c
23
src/SDL.c
@@ -307,20 +307,6 @@ SDL_bool SDL_InitSubSystem(SDL_InitFlags flags)
|
||||
flags_initialized |= SDL_INIT_EVENTS;
|
||||
}
|
||||
|
||||
// Initialize the timer subsystem
|
||||
if (flags & SDL_INIT_TIMER) {
|
||||
if (SDL_ShouldInitSubsystem(SDL_INIT_TIMER)) {
|
||||
SDL_IncrementSubsystemRefCount(SDL_INIT_TIMER);
|
||||
if (!SDL_InitTimers()) {
|
||||
SDL_DecrementSubsystemRefCount(SDL_INIT_TIMER);
|
||||
goto quit_and_error;
|
||||
}
|
||||
} else {
|
||||
SDL_IncrementSubsystemRefCount(SDL_INIT_TIMER);
|
||||
}
|
||||
flags_initialized |= SDL_INIT_TIMER;
|
||||
}
|
||||
|
||||
// Initialize the video subsystem
|
||||
if (flags & SDL_INIT_VIDEO) {
|
||||
#ifndef SDL_VIDEO_DISABLED
|
||||
@@ -573,13 +559,6 @@ void SDL_QuitSubSystem(SDL_InitFlags flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flags & SDL_INIT_TIMER) {
|
||||
if (SDL_ShouldQuitSubsystem(SDL_INIT_TIMER)) {
|
||||
SDL_QuitTimers();
|
||||
}
|
||||
SDL_DecrementSubsystemRefCount(SDL_INIT_TIMER);
|
||||
}
|
||||
|
||||
if (flags & SDL_INIT_EVENTS) {
|
||||
if (SDL_ShouldQuitSubsystem(SDL_INIT_EVENTS)) {
|
||||
SDL_QuitEvents();
|
||||
@@ -632,6 +611,8 @@ void SDL_Quit(void)
|
||||
SDL_DBus_Quit();
|
||||
#endif
|
||||
|
||||
SDL_QuitTimers();
|
||||
|
||||
SDL_SetObjectsInvalid();
|
||||
SDL_AssertionsQuit();
|
||||
|
||||
|
Reference in New Issue
Block a user