hia: Only reference AppDataManager properties after they've been initialized

This commit is contained in:
Evan Husted 2024-12-11 15:23:31 -06:00 committed by Evan Husted
parent 5152aae4c4
commit 3f5c2e187e

View file

@ -90,15 +90,6 @@ namespace Ryujinx.Headless
// Logging system information. // Logging system information.
Program.PrintSystemInfo(); 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) public static void Entrypoint(string[] args)
@ -427,6 +418,15 @@ namespace Ryujinx.Headless
AppDataManager.Initialize(option.BaseDataDir); 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(); ReloadConfig();
_virtualFileSystem = VirtualFileSystem.CreateInstance(); _virtualFileSystem = VirtualFileSystem.CreateInstance();