mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove SDL_GetTicks64() ifdefs
We can now use the function that doesn't wrap after ~49 days since SDL 2.0.18 released.
This commit is contained in:
@@ -357,11 +357,7 @@ static void cleanup(void);
|
||||
static void emscriptenloop(void)
|
||||
{
|
||||
timePrev = time_;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 17)
|
||||
time_ = SDL_GetTicks64();
|
||||
#else
|
||||
time_ = SDL_GetTicks();
|
||||
#endif
|
||||
deltaloop();
|
||||
}
|
||||
#endif
|
||||
@@ -674,32 +670,20 @@ int main(int argc, char *argv[])
|
||||
#else
|
||||
while (true)
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 17)
|
||||
f_time = SDL_GetTicks64();
|
||||
#else
|
||||
f_time = SDL_GetTicks();
|
||||
#endif
|
||||
|
||||
const Uint64 f_timetaken = f_time - f_timePrev;
|
||||
if (!game.over30mode && f_timetaken < 34)
|
||||
{
|
||||
const volatile Uint64 f_delay = 34 - f_timetaken;
|
||||
SDL_Delay((Uint32) f_delay);
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 17)
|
||||
f_time = SDL_GetTicks64();
|
||||
#else
|
||||
f_time = SDL_GetTicks();
|
||||
#endif
|
||||
}
|
||||
|
||||
f_timePrev = f_time;
|
||||
|
||||
timePrev = time_;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 17)
|
||||
time_ = SDL_GetTicks64();
|
||||
#else
|
||||
time_ = SDL_GetTicks();
|
||||
#endif
|
||||
|
||||
deltaloop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user