Add UI toggle for vertical sync option

このコミットが含まれているのは:
Sergio Pedri committed 2022-01-20 23:13:54 +01:00
1 親 9bc9c97eaa
コミット 3e26096797
4ファイル変更
+22

検索条件に一致するファイルはありません

+18
ファイルの表示
@@ -35,6 +35,7 @@ public sealed class MainViewModel : ObservableObject
Guard.IsNotNull(analyticsService, nameof(analyticsService));
this.analyticsService = analyticsService;
this.isVerticalSyncEnabled = true;
this.isDynamicResolutionEnabled = true;
this.selectedResolutionScale = 100;
this.selectedComputeShader = ComputeShaderOptions[0];
@@ -49,6 +50,23 @@ public sealed class MainViewModel : ObservableObject
/// </summary>
public IList<int> ResolutionScaleOptions { get; } = new[] { 25, 50, 75, 100 };
private bool isVerticalSyncEnabled;
/// <summary>
/// Gets or sets whether the vertical sync is enabled.
/// </summary>
public bool IsVerticalSyncEnabled
{
get => this.isVerticalSyncEnabled;
set
{
if (SetProperty(ref this.isVerticalSyncEnabled, value))
{
this.analyticsService.Log(Event.IsVerticalSyncEnabledChanged, (nameof(value), value));
}
}
}
private bool isDynamicResolutionEnabled;
/// <summary>