Check if game directories have been updated before refreshing GUI (#3607)
* Check if game directories have been updated before refreshing list on save. * Cleanup spacing * Add Avalonia and reset value after saving * Fix Avalonia * Fix multiple directories not being added in GTK
This commit is contained in:
parent
88a0e720cb
commit
54421760c3
3 changed files with 45 additions and 15 deletions
|
@ -49,6 +49,7 @@ namespace Ryujinx.Ava.Ui.ViewModels
|
|||
private float _previousVolumeLevel;
|
||||
private float _volume;
|
||||
private bool _isVulkanAvailable = true;
|
||||
private bool _directoryChanged = false;
|
||||
private List<string> _gpuIds = new List<string>();
|
||||
private KeyboardHotkeys _keyboardHotkeys;
|
||||
private int _graphicsBackendIndex;
|
||||
|
@ -112,6 +113,17 @@ namespace Ryujinx.Ava.Ui.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public bool DirectoryChanged
|
||||
{
|
||||
get => _directoryChanged;
|
||||
set
|
||||
{
|
||||
_directoryChanged = value;
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool EnableDiscordIntegration { get; set; }
|
||||
public bool CheckUpdatesOnStart { get; set; }
|
||||
public bool ShowConfirmExit { get; set; }
|
||||
|
@ -397,10 +409,14 @@ namespace Ryujinx.Ava.Ui.ViewModels
|
|||
|
||||
public async Task SaveSettings()
|
||||
{
|
||||
List<string> gameDirs = new List<string>(GameDirectories);
|
||||
|
||||
ConfigurationState config = ConfigurationState.Instance;
|
||||
|
||||
if (_directoryChanged)
|
||||
{
|
||||
List<string> gameDirs = new List<string>(GameDirectories);
|
||||
config.Ui.GameDirs.Value = gameDirs;
|
||||
}
|
||||
|
||||
if (_validTzRegions.Contains(TimeZone))
|
||||
{
|
||||
config.System.TimeZone.Value = TimeZone;
|
||||
|
@ -465,7 +481,6 @@ namespace Ryujinx.Ava.Ui.ViewModels
|
|||
|
||||
config.System.SystemTimeOffset.Value = systemTimeOffset.Seconds;
|
||||
config.Graphics.ShadersDumpPath.Value = ShaderDumpPath;
|
||||
config.Ui.GameDirs.Value = gameDirs;
|
||||
config.System.FsGlobalAccessLogMode.Value = FsGlobalAccessLogMode;
|
||||
config.System.MemoryManagerMode.Value = (MemoryManagerMode)MemoryMode;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue