diff --git a/src/window.c b/src/window.c index ff3155c..4c76ee5 100644 --- a/src/window.c +++ b/src/window.c @@ -394,6 +394,9 @@ static void resetEvents() { static void draw() { + // touch monotonic timer to not skip the moment of overflow + windowGetMonotonicMilliseconds(); + unsigned int currentFrameTimeMs = SDL_GetTicks(); unsigned long long deltaUs = firstFrame ? 0 : (currentFrameTimeMs - prevFrameTimeMs)*1000ull; prevFrameTimeMs = currentFrameTimeMs;