1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-13 03:46:40 +00:00
Ryujinx/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs

19 lines
605 B
C#
Raw Normal View History

using System.IO;
using System.Linq;
using System.Runtime.Versioning;
namespace Ryujinx.Common.SystemInfo
{
[SupportedOSPlatform("linux")]
internal class LinuxSystemInfo : SystemInfo
{
public override string CpuName { get; }
public override ulong RamSize { get; }
public LinuxSystemInfo()
{
CpuName = File.ReadAllLines("/proc/cpuinfo").Where(line => line.StartsWith("model name")).ToList()[0].Split(":")[1].Trim();
RamSize = ulong.Parse(File.ReadAllLines("/proc/meminfo")[0].Split(":")[1].Trim().Split(" ")[0]) * 1024;
}
}
}