From b983588d2ebc94cf85f420e7be67593167f9ef45 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Fri, 18 Mar 2016 22:58:48 -0300 Subject: [PATCH] We don't need to initialize the SDL timer subsystem to use SDL_Delay, and initializing it causes SDL to create a worker thread (which it uses for SDL_AddTimer and friends, which we don't use). --- src/modules/timer/sdl/Timer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/timer/sdl/Timer.cpp b/src/modules/timer/sdl/Timer.cpp index 528ed190e..a4d778b37 100644 --- a/src/modules/timer/sdl/Timer.cpp +++ b/src/modules/timer/sdl/Timer.cpp @@ -34,15 +34,12 @@ namespace sdl Timer::Timer() { - // Init the SDL timer system (needed for SDL_Delay.) - if (SDL_InitSubSystem(SDL_INIT_TIMER) < 0) - throw love::Exception("Could not initialize SDL timer subsystem (%s)", SDL_GetError()); + // We don't need to initialize the SDL timer subsystem for SDL_Delay to + // function - and doing so causes SDL to create a worker thread. } Timer::~Timer() { - // Quit SDL timer. - SDL_QuitSubSystem(SDL_INIT_TIMER); } const char *Timer::getName() const