Fix SystemInfo logging to file (#1217)

We currently logs system informations before we load the configuration file.
Since the logger use the configuration file (to sets if it should store the logs in a file, etc...), if we print something before the configuration init, the log file doesn't contains any system informations.
Now it's fixed.
This commit is contained in:
Ac_K 2020-05-07 15:24:33 +02:00 committed by GitHub
parent 1e687c4eea
commit 0711ffd52b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,12 +43,6 @@ namespace Ryujinx
// Initialize Discord integration // Initialize Discord integration
DiscordIntegrationModule.Initialize(); DiscordIntegrationModule.Initialize();
Logger.PrintInfo(LogClass.Application, $"Ryujinx Version: {Version}");
Logger.PrintInfo(LogClass.Application, $"Operating System: {SystemInfo.Instance.OsDescription}");
Logger.PrintInfo(LogClass.Application, $"CPU: {SystemInfo.Instance.CpuName}");
Logger.PrintInfo(LogClass.Application, $"Total RAM: {SystemInfo.Instance.RamSizeInMB}");
string localConfigurationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"); string localConfigurationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json");
string globalBasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx"); string globalBasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx");
string globalConfigurationPath = Path.Combine(globalBasePath, "Config.json"); string globalConfigurationPath = Path.Combine(globalBasePath, "Config.json");
@ -82,6 +76,12 @@ namespace Ryujinx
ConfigurationState.Instance.ToFileFormat().SaveConfig(globalConfigurationPath); ConfigurationState.Instance.ToFileFormat().SaveConfig(globalConfigurationPath);
} }
Logger.PrintInfo(LogClass.Application, $"Ryujinx Version: {Version}");
Logger.PrintInfo(LogClass.Application, $"Operating System: {SystemInfo.Instance.OsDescription}");
Logger.PrintInfo(LogClass.Application, $"CPU: {SystemInfo.Instance.CpuName}");
Logger.PrintInfo(LogClass.Application, $"Total RAM: {SystemInfo.Instance.RamSizeInMB}");
Profile.Initialize(); Profile.Initialize();
Application.Init(); Application.Init();