mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-08-03 11:23:51 +00:00
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using Ryujinx.Ava.Common.Locale;
|
|
using Ryujinx.Ava.UI.SetupWizard.Pages;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Ryujinx.Ava.UI.SetupWizard
|
|
{
|
|
public partial class RyujinxSetupWizard
|
|
{
|
|
private async ValueTask<bool> SetupKeys()
|
|
{
|
|
if (_overwrite || !RyujinxApp.MainWindow.VirtualFileSystem.HasKeySet)
|
|
{
|
|
Retry:
|
|
bool result = await NextPage<SetupKeysPage, SetupKeysPageContext>(out SetupKeysPageContext keyContext)
|
|
.Show();
|
|
|
|
if (!result)
|
|
return false;
|
|
|
|
if (!keyContext.CompleteStep())
|
|
goto Retry;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
private async ValueTask<bool> SetupFirmware()
|
|
{
|
|
if (_overwrite || !HasFirmware)
|
|
{
|
|
if (!RyujinxApp.MainWindow.VirtualFileSystem.HasKeySet)
|
|
{
|
|
NotificationManager.Error("Keys still seem to not be installed. Please try again.");
|
|
return false;
|
|
}
|
|
|
|
Retry:
|
|
bool result = await NextPage<SetupFirmwarePage, SetupFirmwarePageContext>(out SetupFirmwarePageContext fwContext)
|
|
.Show();
|
|
|
|
if (!result)
|
|
return false;
|
|
|
|
if (!fwContext.CompleteStep())
|
|
goto Retry;
|
|
|
|
OnPropertyChanged(nameof(HasFirmware));
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|