From 1663cb41961baa288ac7400286eef3df90b31295 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 15 Sep 2022 06:30:19 -0700 Subject: [PATCH] Reset simulated presentation timeline when vsync status changes --- src/render/SDL_render.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 0930d80f2..c0b0032b1 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -4575,6 +4575,7 @@ SDL_RenderSetVSync(SDL_Renderer * renderer, int vsync) } renderer->wanted_vsync = vsync ? SDL_TRUE : SDL_FALSE; + renderer->last_present = 0; if (!renderer->SetVSync || renderer->SetVSync(renderer, vsync) < 0) {