aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs')
-rw-r--r--Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs b/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs
index 36b37b0f..7045c9ed 100644
--- a/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs
+++ b/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs
@@ -45,6 +45,8 @@ namespace Ryujinx.Ava.UI.ViewModels
private KeyboardHotkeys _keyboardHotkeys;
private int _graphicsBackendIndex;
private string _customThemePath;
+ private int _scalingFilter;
+ private int _scalingFilterLevel;
public event Action CloseWindow;
public event Action SaveSettingsEvent;
@@ -153,6 +155,8 @@ namespace Ryujinx.Ava.UI.ViewModels
public bool IsSDL2Enabled { get; set; }
public bool EnableCustomTheme { get; set; }
public bool IsCustomResolutionScaleActive => _resolutionScale == 4;
+ public bool IsScalingFilterActive => _scalingFilter == (int)Ryujinx.Common.Configuration.ScalingFilter.Fsr;
+
public bool IsVulkanSelected => GraphicsBackendIndex == 0;
public bool UseHypervisor { get; set; }
@@ -179,6 +183,18 @@ namespace Ryujinx.Ava.UI.ViewModels
public int AudioBackend { get; set; }
public int MaxAnisotropy { get; set; }
public int AspectRatio { get; set; }
+ public int AntiAliasingEffect { get; set; }
+ public string ScalingFilterLevelText => ScalingFilterLevel.ToString("0");
+ public int ScalingFilterLevel
+ {
+ get => _scalingFilterLevel;
+ set
+ {
+ _scalingFilterLevel = value;
+ OnPropertyChanged();
+ OnPropertyChanged(nameof(ScalingFilterLevelText));
+ }
+ }
public int OpenglDebugLevel { get; set; }
public int MemoryMode { get; set; }
public int BaseStyleIndex { get; set; }
@@ -192,6 +208,16 @@ namespace Ryujinx.Ava.UI.ViewModels
OnPropertyChanged(nameof(IsVulkanSelected));
}
}
+ public int ScalingFilter
+ {
+ get => _scalingFilter;
+ set
+ {
+ _scalingFilter = value;
+ OnPropertyChanged();
+ OnPropertyChanged(nameof(IsScalingFilterActive));
+ }
+ }
public int PreferredGpuIndex { get; set; }
@@ -365,6 +391,9 @@ namespace Ryujinx.Ava.UI.ViewModels
AspectRatio = (int)config.Graphics.AspectRatio.Value;
GraphicsBackendMultithreadingIndex = (int)config.Graphics.BackendThreading.Value;
ShaderDumpPath = config.Graphics.ShadersDumpPath;
+ AntiAliasingEffect = (int)config.Graphics.AntiAliasing.Value;
+ ScalingFilter = (int)config.Graphics.ScalingFilter.Value;
+ ScalingFilterLevel = config.Graphics.ScalingFilterLevel.Value;
// Audio
AudioBackend = (int)config.System.AudioBackend.Value;
@@ -447,6 +476,9 @@ namespace Ryujinx.Ava.UI.ViewModels
config.Graphics.ResScaleCustom.Value = CustomResolutionScale;
config.Graphics.MaxAnisotropy.Value = MaxAnisotropy == 0 ? -1 : MathF.Pow(2, MaxAnisotropy);
config.Graphics.AspectRatio.Value = (AspectRatio)AspectRatio;
+ config.Graphics.AntiAliasing.Value = (AntiAliasing)AntiAliasingEffect;
+ config.Graphics.ScalingFilter.Value = (ScalingFilter)ScalingFilter;
+ config.Graphics.ScalingFilterLevel.Value = ScalingFilterLevel;
if (ConfigurationState.Instance.Graphics.BackendThreading != (BackendThreading)GraphicsBackendMultithreadingIndex)
{