Ryujinx/Ryujinx.Common/SystemInfo/SystemInfo.cs
Ac_K 5e6dc37aed
common: Fix last warning in SystemInfo (#1757)
* common: Fix last warning in SystemInfo

* info to Info

* fix MacOSSystemInfo file name by delete the file

* MacOSSysteminfo to MacOSSystemInfo
2020-12-01 22:26:00 +01:00

35 lines
1,019 B
C#

using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Common.SystemInfo
{
public class SystemInfo
{
public virtual string OsDescription => $"{RuntimeInformation.OSDescription} ({RuntimeInformation.OSArchitecture})";
public virtual string CpuName => "Unknown";
public virtual ulong RamSize => 0;
public string RamSizeInMB => (RamSize == 0) ? "Unknown" : $"{RamSize / 1024 / 1024} MB";
public static SystemInfo Instance { get; }
static SystemInfo()
{
if (OperatingSystem.IsWindows())
{
Instance = new WindowsSystemInfo();
}
else if (OperatingSystem.IsLinux())
{
Instance = new LinuxSystemInfo();
}
else if (OperatingSystem.IsMacOS())
{
Instance = new MacOSSystemInfo();
}
else
{
Instance = new SystemInfo();
}
}
}
}