Make sure we never get a zero tick_start value
This commit is contained in:
1 parent
c468d93760
commit
57d34f2e10
1 file changed
+3
@@ -550,6 +550,9 @@ void SDL_TicksInit(void)
|
|||||||
tick_denominator_ms = (Uint32)(tick_freq / gcd);
|
tick_denominator_ms = (Uint32)(tick_freq / gcd);
|
||||||
|
|
||||||
tick_start = SDL_GetPerformanceCounter();
|
tick_start = SDL_GetPerformanceCounter();
|
||||||
|
if (!tick_start) {
|
||||||
|
--tick_start;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDL_TicksQuit(void)
|
void SDL_TicksQuit(void)
|
||||||
|
|||||||
Reference in new issue
Block a user