mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-03-11 21:15:39 +00:00
use lambda-based config modifier insstead of manually setting a bool to true
This commit is contained in:
parent
6ee7957574
commit
b7dd718d6f
2 changed files with 12 additions and 8 deletions
|
|
@ -31,9 +31,12 @@ namespace Ryujinx.UI.SetupWizard.Pages
|
||||||
return Result.Fail;
|
return Result.Fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationState.Instance.UI.GameDirs.Value = GameDirs.ToList();
|
OwningWizard.ModifyConfig(config =>
|
||||||
ConfigurationState.Instance.UI.AutoloadDirs.Value = UpdateAndDlcDirs.ToList();
|
{
|
||||||
OwningWizard.SignalConfigModified();
|
config.UI.GameDirs.Value = GameDirs.ToList();
|
||||||
|
config.UI.AutoloadDirs.Value = UpdateAndDlcDirs.ToList();
|
||||||
|
});
|
||||||
|
|
||||||
RyujinxApp.MainWindow.LoadApplications();
|
RyujinxApp.MainWindow.LoadApplications();
|
||||||
|
|
||||||
return Result.Success;
|
return Result.Success;
|
||||||
|
|
|
||||||
|
|
@ -57,15 +57,16 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
.WithTitle(boundContext.Title)
|
.WithTitle(boundContext.Title)
|
||||||
.WithActionContent(boundContext.ActionContent);
|
.WithActionContent(boundContext.ActionContent);
|
||||||
|
|
||||||
public void SignalConfigModified()
|
|
||||||
{
|
|
||||||
_configWasModified = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool HasFirmware => RyujinxApp.MainWindow.ContentManager.GetCurrentFirmwareVersion() != null;
|
public static bool HasFirmware => RyujinxApp.MainWindow.ContentManager.GetCurrentFirmwareVersion() != null;
|
||||||
|
|
||||||
public RyujinxNotificationManager NotificationManager { get; private set; }
|
public RyujinxNotificationManager NotificationManager { get; private set; }
|
||||||
|
|
||||||
|
internal void ModifyConfig(Action<ConfigurationState> modifier)
|
||||||
|
{
|
||||||
|
modifier(ConfigurationState.Instance);
|
||||||
|
_configWasModified = true;
|
||||||
|
}
|
||||||
|
|
||||||
public async Task Start()
|
public async Task Start()
|
||||||
{
|
{
|
||||||
NotificationManager = _window.CreateNotificationManager(
|
NotificationManager = _window.CreateNotificationManager(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue