mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-14 19:36:59 +00:00
misc: More Mvvm usage instead of writing out the observable properties
This commit is contained in:
parent
3525d5ecd4
commit
27c5cba10b
11 changed files with 72 additions and 277 deletions
|
|
@ -1,9 +1,10 @@
|
|||
using Gommon;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Gommon;
|
||||
using Ryujinx.Ava.Utilities.Configuration;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
public class SettingsHacksViewModel : BaseModel
|
||||
public partial class SettingsHacksViewModel : BaseModel
|
||||
{
|
||||
private readonly SettingsViewModel _baseViewModel;
|
||||
|
||||
|
|
@ -14,31 +15,9 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
_baseViewModel = settingsVm;
|
||||
}
|
||||
|
||||
private bool _xc2MenuSoftlockFix = ConfigurationState.Instance.Hacks.Xc2MenuSoftlockFix;
|
||||
private bool _shaderTranslationThreadSleep = ConfigurationState.Instance.Hacks.EnableShaderTranslationDelay;
|
||||
[ObservableProperty] private bool _xc2MenuSoftlockFix = ConfigurationState.Instance.Hacks.Xc2MenuSoftlockFix;
|
||||
[ObservableProperty] private bool _shaderTranslationDelayEnabled = ConfigurationState.Instance.Hacks.EnableShaderTranslationDelay;
|
||||
private int _shaderTranslationSleepDelay = ConfigurationState.Instance.Hacks.ShaderTranslationDelay;
|
||||
|
||||
public bool Xc2MenuSoftlockFixEnabled
|
||||
{
|
||||
get => _xc2MenuSoftlockFix;
|
||||
set
|
||||
{
|
||||
_xc2MenuSoftlockFix = value;
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShaderTranslationDelayEnabled
|
||||
{
|
||||
get => _shaderTranslationThreadSleep;
|
||||
set
|
||||
{
|
||||
_shaderTranslationThreadSleep = value;
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public string ShaderTranslationDelayValueText => $"{ShaderTranslationDelay}ms";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue