Reset simulated presentation timeline when vsync status changes

This commit is contained in:
Sam Lantinga 2022-09-15 06:30:19 -07:00
parent d744aafb05
commit 1663cb4196
1 changed files with 1 additions and 0 deletions

View File

@ -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) {