From 6f56690c1c4d04a9c0152100ca2940d9885a2dc0 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Wed, 11 Dec 2024 15:23:31 -0600 Subject: [PATCH] hia: Only reference AppDataManager properties after they've been initialized --- src/Ryujinx/Headless/HeadlessRyujinx.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Ryujinx/Headless/HeadlessRyujinx.cs b/src/Ryujinx/Headless/HeadlessRyujinx.cs index 4135a3e38..7f3f697f5 100644 --- a/src/Ryujinx/Headless/HeadlessRyujinx.cs +++ b/src/Ryujinx/Headless/HeadlessRyujinx.cs @@ -89,15 +89,6 @@ namespace Ryujinx.Headless // Logging system information. Program.PrintSystemInfo(); - - // Check if keys exists. - if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys"))) - { - if (!(AppDataManager.Mode == AppDataManager.LaunchMode.UserProfile && File.Exists(Path.Combine(AppDataManager.KeysDirPathUser, "prod.keys")))) - { - Logger.Error?.Print(LogClass.Application, "Keys not found"); - } - } } public static void Entrypoint(string[] args) @@ -426,6 +417,15 @@ namespace Ryujinx.Headless AppDataManager.Initialize(option.BaseDataDir); + // Check if keys exists. + if (!File.Exists(Path.Combine(AppDataManager.KeysDirPath, "prod.keys"))) + { + if (!(AppDataManager.Mode == AppDataManager.LaunchMode.UserProfile && File.Exists(Path.Combine(AppDataManager.KeysDirPathUser, "prod.keys")))) + { + Logger.Error?.Print(LogClass.Application, "Keys not found"); + } + } + ReloadConfig(); _virtualFileSystem = VirtualFileSystem.CreateInstance();