mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-11 16:36:58 +00:00
cleanup
This commit is contained in:
parent
07834ad4a2
commit
f566a4d921
1 changed files with 12 additions and 9 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
|
using Avalonia.Controls.Notifications;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
using Ryujinx.Ava.Systems.Configuration;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.SetupWizard.Pages;
|
using Ryujinx.Ava.UI.SetupWizard.Pages;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.SetupWizard
|
namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
|
|
@ -17,7 +17,8 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
|
|
||||||
public async Task Start()
|
public async Task Start()
|
||||||
{
|
{
|
||||||
NotificationHelper = new NotificationHelper(wizardWindow);
|
// I wanted to do bottom center but that...literally just shows top center? Okay.
|
||||||
|
Notification = new NotificationHelper(wizardWindow, NotificationPosition.TopCenter);
|
||||||
RyujinxSetupWizardWindow.IsOpen = true;
|
RyujinxSetupWizardWindow.IsOpen = true;
|
||||||
Start:
|
Start:
|
||||||
await FirstPage()
|
await FirstPage()
|
||||||
|
|
@ -37,17 +38,19 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
goto Keys;
|
goto Keys;
|
||||||
|
|
||||||
Return:
|
Return:
|
||||||
NotificationHelper = null;
|
if (_configWasModified)
|
||||||
|
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.GlobalConfigurationPath);
|
||||||
|
|
||||||
|
Notification = null;
|
||||||
wizardWindow.Close();
|
wizardWindow.Close();
|
||||||
RyujinxSetupWizardWindow.IsOpen = false;
|
RyujinxSetupWizardWindow.IsOpen = false;
|
||||||
|
|
||||||
if (_configWasModified)
|
|
||||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.GlobalConfigurationPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async ValueTask<bool> SetupKeys()
|
private async ValueTask<bool> SetupKeys()
|
||||||
{
|
{
|
||||||
if (!_mainWindow.VirtualFileSystem.HasKeySet)
|
if (overwriteMode || !RyujinxApp.MainWindow.VirtualFileSystem.HasKeySet)
|
||||||
{
|
{
|
||||||
Retry:
|
Retry:
|
||||||
bool result = await NextPage()
|
bool result = await NextPage()
|
||||||
|
|
@ -67,11 +70,11 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||||
|
|
||||||
private async ValueTask<bool> SetupFirmware()
|
private async ValueTask<bool> SetupFirmware()
|
||||||
{
|
{
|
||||||
if (!HasFirmware)
|
if (overwriteMode || !HasFirmware)
|
||||||
{
|
{
|
||||||
if (!_mainWindow.VirtualFileSystem.HasKeySet)
|
if (!RyujinxApp.MainWindow.VirtualFileSystem.HasKeySet)
|
||||||
{
|
{
|
||||||
NotificationHelper.ShowError("Keys still seem to not be installed. Please try again.");
|
Notification.NotifyError("Keys still seem to not be installed. Please try again.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue