From 651a07c6c2a3e89c059d56e916c45e1881d56abc Mon Sep 17 00:00:00 2001 From: Mary <57835969+h1k421@users.noreply.github.com> Date: Mon, 4 May 2020 04:15:27 +0200 Subject: Refactor SystemInfo and implement macOS system info backend (#1177) --- Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs (limited to 'Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs') diff --git a/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs b/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs new file mode 100644 index 00000000..bd3ee57a --- /dev/null +++ b/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs @@ -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; + } + } +} \ No newline at end of file -- cgit v1.2.3