Removed SDL_INIT_TIMER

This is no longer necessary before calling SDL_AddTimer()
This commit is contained in:
Sam Lantinga committed 2024-09-17 08:53:27 -07:00
1 parent 9275c533ca
commit f3e419596b
10 files changed
+6 -52

No files matched your search

-10
View File
@@ -178,8 +178,6 @@ static Uint64 SDLTest_GenerateExecKey(const char *runSeed, const char *suiteName
/**
* Set timeout handler for test.
*
* Note: SDL_Init(SDL_INIT_TIMER) will be called if it wasn't done so before.
*
* \param timeout Timeout interval in seconds.
* \param callback Function that will be called after timeout has elapsed.
*
@@ -200,14 +198,6 @@ static SDL_TimerID SDLTest_SetTestTimeout(int timeout, SDL_TimerCallback callbac
return 0;
}
/* Init SDL timer if not initialized before */
if (!SDL_WasInit(SDL_INIT_TIMER)) {
if (!SDL_InitSubSystem(SDL_INIT_TIMER)) {
SDLTest_LogError("Failed to init timer subsystem: %s", SDL_GetError());
return 0;
}
}
/* Set timer */
timeoutInMilliseconds = timeout * 1000;
timerID = SDL_AddTimer(timeoutInMilliseconds, callback, 0x0);