mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-28 18:32:03 +00:00
Make sure to reload keys after Migration
This fix keys not being loaded on the first run right after migration.
This commit is contained in:
parent
63b24b4af2
commit
01daefe38d
2 changed files with 5 additions and 2 deletions
|
@ -50,7 +50,7 @@ namespace Ryujinx
|
||||||
|
|
||||||
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx", "system", "prod.keys");
|
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx", "system", "prod.keys");
|
||||||
string userProfilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".switch", "prod.keys");
|
string userProfilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".switch", "prod.keys");
|
||||||
if (!File.Exists(appDataPath) && !File.Exists(userProfilePath))
|
if (!File.Exists(appDataPath) && !File.Exists(userProfilePath) && !Migration.IsMigrationNeeded())
|
||||||
{
|
{
|
||||||
GtkDialog.CreateErrorDialog("Key file was not found. Please refer to `KEYS.md` for more info");
|
GtkDialog.CreateErrorDialog("Key file was not found. Please refer to `KEYS.md` for more info");
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,9 @@ namespace Ryujinx.Ui
|
||||||
|
|
||||||
dialogSuccess.Run();
|
dialogSuccess.Run();
|
||||||
|
|
||||||
|
// Reload key set after migration to be sure to catch the keys in the system directory.
|
||||||
|
device.System.LoadKeySet();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (HorizonResultException ex)
|
catch (HorizonResultException ex)
|
||||||
|
@ -171,7 +174,7 @@ namespace Ryujinx.Ui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool IsMigrationNeeded()
|
public static bool IsMigrationNeeded()
|
||||||
{
|
{
|
||||||
string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue