Refactor SystemInfo and implement macOS system info backend (#1177)
This commit is contained in:
parent
4c54f36c38
commit
651a07c6c2
6 changed files with 187 additions and 45 deletions
17
Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
Normal file
17
Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ryujinx.Common.SystemInfo
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue