forked from rosebudai/OpenRCT2-Web
Actually toggle vsync instead of re-initialising the entire thing again
This commit is contained in:
1 file changed
+4
@@ -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