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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user