aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThog <me@thog.eu>2020-01-05 16:39:35 +0100
committerThog <me@thog.eu>2020-01-05 16:39:35 +0100
commit01daefe38d0caff072579cb688dba5b9e3670fa4 (patch)
tree44055f927b2bf3f747ad297fcb07d4693d56b778
parent63b24b4af2804f173764c98586a19c39db04ad4d (diff)
Make sure to reload keys after Migration
This fix keys not being loaded on the first run right after migration.
-rw-r--r--Ryujinx/Program.cs2
-rw-r--r--Ryujinx/Ui/Migration.cs5
2 files changed, 5 insertions, 2 deletions
diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs
index b2b6cc73..fbf1196d 100644
--- a/Ryujinx/Program.cs
+++ b/Ryujinx/Program.cs
@@ -50,7 +50,7 @@ namespace Ryujinx
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");
- 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");
}
diff --git a/Ryujinx/Ui/Migration.cs b/Ryujinx/Ui/Migration.cs
index c508878d..9e9b8000 100644
--- a/Ryujinx/Ui/Migration.cs
+++ b/Ryujinx/Ui/Migration.cs
@@ -64,6 +64,9 @@ namespace Ryujinx.Ui
dialogSuccess.Run();
+ // Reload key set after migration to be sure to catch the keys in the system directory.
+ device.System.LoadKeySet();
+
return true;
}
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);