aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
diff options
context:
space:
mode:
authorMary <57835969+h1k421@users.noreply.github.com>2020-05-04 04:15:27 +0200
committerGitHub <noreply@github.com>2020-05-04 12:15:27 +1000
commit651a07c6c2a3e89c059d56e916c45e1881d56abc (patch)
treec53cd1f08b93e363fa838ad5e5643ba47f7bd734 /Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
parent4c54f36c380683ef4575becf516953b7b0dfd6fc (diff)
Refactor SystemInfo and implement macOS system info backend (#1177)
Diffstat (limited to 'Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs')
-rw-r--r--Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs17
1 files changed, 17 insertions, 0 deletions
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