mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-14 16:37:07 +00:00
UI: Only show Amiibo bin scan menu item if the key file exists
This commit is contained in:
parent
9b5151dddb
commit
87067b5b32
4 changed files with 8 additions and 5 deletions
|
|
@ -333,10 +333,9 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption
|
|||
return Path.Combine(AppDataManager.KeysDirPath, "key_retail.bin");
|
||||
}
|
||||
|
||||
public static bool HasKeyRetailBinPath()
|
||||
{
|
||||
return File.Exists(GetKeyRetailBinPath());
|
||||
}
|
||||
public static bool HasKeyRetailBinPath => File.Exists(GetKeyRetailBinPath());
|
||||
|
||||
|
||||
public static DateTime DateTimeFromTag(ushort value)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -307,6 +307,9 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanScanAmiiboBinaries => AmiiboBinReader.HasKeyRetailBinPath;
|
||||
|
||||
public bool ShowLoadProgress
|
||||
{
|
||||
get => _showLoadProgress;
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@
|
|||
AttachedToVisualTree="ScanBinAmiiboMenuItem_AttachedToVisualTree"
|
||||
Click="OpenBinFile"
|
||||
Header="{locale:Locale MenuBarActionsScanAmiiboBin}"
|
||||
IsVisible="{Binding CanScanAmiiboBinaries}"
|
||||
IsEnabled="{Binding IsAmiiboBinRequested}" />
|
||||
<MenuItem
|
||||
Command="{Binding TakeScreenshot}"
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
private void ScanBinAmiiboMenuItem_AttachedToVisualTree(object sender, VisualTreeAttachmentEventArgs e)
|
||||
{
|
||||
if (sender is MenuItem)
|
||||
ViewModel.IsAmiiboBinRequested = ViewModel.IsAmiiboRequested && AmiiboBinReader.HasKeyRetailBinPath();
|
||||
ViewModel.IsAmiiboBinRequested = ViewModel.IsAmiiboRequested && AmiiboBinReader.HasKeyRetailBinPath;
|
||||
}
|
||||
|
||||
private async void InstallFileTypes_Click(object sender, RoutedEventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue