Fixed presentation reset calculation (thanks @zturtleman!)

This commit is contained in:
Sam Lantinga 2022-12-04 09:28:03 -08:00
parent f9ad84fd5d
commit f32cdfa096
1 changed files with 1 additions and 1 deletions

View File

@ -4205,7 +4205,7 @@ static void SDL_RenderSimulateVSync(SDL_Renderer *renderer)
}
elapsed = (now - renderer->last_present);
if (!renderer->last_present || elapsed > SDL_NS_TO_MS(1000)) {
if (!renderer->last_present || elapsed > SDL_MS_TO_NS(1000)) {
/* It's been too long, reset the presentation timeline */
renderer->last_present = now;
} else {