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

@@ -73,6 +73,7 @@ namespace OpenRA
void DisableDepthBuffer();
void ClearDepthBuffer();
void SetBlendMode(BlendMode mode);
void SetVSyncEnabled(bool enabled);
string GLVersion { get; }
}

View File

@@ -427,6 +427,11 @@ namespace OpenRA
Window.Dispose();
}
public void SetVSyncEnabled(bool enabled)
{
Window.Context.SetVSyncEnabled(enabled);
}
public string GetClipboardText()
{
return Window.GetClipboardText();

View File

@@ -138,6 +138,9 @@ namespace OpenRA
[Desc("This can be set to Windowed, Fullscreen or PseudoFullscreen.")]
public WindowMode Mode = WindowMode.PseudoFullscreen;
[Desc("Enable VSync.")]
public bool VSync = true;
[Desc("Screen resolution in fullscreen mode.")]
public int2 FullscreenSize = new int2(0, 0);