0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Common/SystemInfo/LinuxSystemInfo.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

19 lines
No EOL
605 B
C#

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;
}
}
}