Add VSync setting.

This commit is contained in:
Paul Chote
2019-12-08 20:47:08 +00:00
committed by teinarss
parent 959c750851
commit 656a260171
9 changed files with 56 additions and 8 deletions

View File

@@ -231,6 +231,12 @@ namespace OpenRA.Platforms.Default
OpenGL.CheckGLError();
}
public void SetVSyncEnabled(bool enabled)
{
VerifyThreadAffinity();
SDL.SDL_GL_SetSwapInterval(enabled ? 1 : 0);
}
public void Dispose()
{
if (disposed)