1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Actually toggle vsync instead of re-initialising the entire thing again

This commit is contained in:
Matt
2024-08-11 10:54:40 +03:00
committed by GitHub
parent 07f54c22bd
commit bbba91de78

View File

@@ -76,11 +76,15 @@ public:
if (_useVsync != vsync)
{
_useVsync = vsync;
#if SDL_VERSION_ATLEAST(2, 0, 18)
SDL_RenderSetVSync(_sdlRenderer, vsync ? 1 : 0);
#else
SDL_DestroyRenderer(_sdlRenderer);
_screenTexture = nullptr;
_scaledScreenTexture = nullptr;
Initialise();
Resize(_uiContext->GetWidth(), _uiContext->GetHeight());
#endif
}
}