Revise SystemInfo (#2047)

* Revise SystemInfo

Cleans up and adds a bit more info (logical core count and available mem at launch) to logs.

- Extract CPU name from CPUID when supported.
- Linux: Robust parsing of procfs files
- Windows: Prefer native calls to WMI
- Remove unnecessary virtual specifiers

* Address gdkchan's comments

* Address AcK's comments

* Address formatting nits
This commit is contained in:
mageven 2021-03-01 09:52:00 +05:30 committed by GitHub
parent d02eeed9c1
commit 06a2b03cc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 218 additions and 82 deletions

View file

@ -168,9 +168,7 @@ namespace Ryujinx
private static void PrintSystemInfo()
{
Logger.Notice.Print(LogClass.Application, $"Ryujinx Version: {Version}");
Logger.Notice.Print(LogClass.Application, $"Operating System: {SystemInfo.Instance.OsDescription}");
Logger.Notice.Print(LogClass.Application, $"CPU: {SystemInfo.Instance.CpuName}");
Logger.Notice.Print(LogClass.Application, $"Total RAM: {SystemInfo.Instance.RamSizeInMB}");
SystemInfo.Gather().Print();
var enabledLogs = Logger.GetEnabledLevels();
Logger.Notice.Print(LogClass.Application, $"Logs Enabled: {(enabledLogs.Count == 0 ? "<None>" : string.Join(", ", enabledLogs))}");