aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/SystemInfo/SystemInfo.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2020-12-01 22:26:00 +0100
committerGitHub <noreply@github.com>2020-12-01 22:26:00 +0100
commit5e6dc37aed22bd596db6a0e9c9a0527fc2a8e5b5 (patch)
tree661c5f4825708f80c2e7e88b7f856d2d74df2af9 /Ryujinx.Common/SystemInfo/SystemInfo.cs
parenta04a1b663d71b861e26f3bf70e8dba8b828f33ea (diff)
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
Diffstat (limited to 'Ryujinx.Common/SystemInfo/SystemInfo.cs')
-rw-r--r--Ryujinx.Common/SystemInfo/SystemInfo.cs29
1 files changed, 9 insertions, 20 deletions
diff --git a/Ryujinx.Common/SystemInfo/SystemInfo.cs b/Ryujinx.Common/SystemInfo/SystemInfo.cs
index 9ab1419c..feb6b8f8 100644
--- a/Ryujinx.Common/SystemInfo/SystemInfo.cs
+++ b/Ryujinx.Common/SystemInfo/SystemInfo.cs
@@ -1,4 +1,5 @@
-using System.Runtime.InteropServices;
+using System;
+using System.Runtime.InteropServices;
namespace Ryujinx.Common.SystemInfo
{
@@ -7,35 +8,23 @@ namespace Ryujinx.Common.SystemInfo
public virtual string OsDescription => $"{RuntimeInformation.OSDescription} ({RuntimeInformation.OSArchitecture})";
public virtual string CpuName => "Unknown";
public virtual ulong RamSize => 0;
-
- public string RamSizeInMB
- {
- get
- {
- if (RamSize == 0)
- {
- return "Unknown";
- }
-
- return $"{RamSize / 1024 / 1024} MB";
- }
- }
+ public string RamSizeInMB => (RamSize == 0) ? "Unknown" : $"{RamSize / 1024 / 1024} MB";
public static SystemInfo Instance { get; }
static SystemInfo()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (OperatingSystem.IsWindows())
{
- Instance = new WindowsSysteminfo();
+ Instance = new WindowsSystemInfo();
}
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ else if (OperatingSystem.IsLinux())
{
- Instance = new LinuxSysteminfo();
+ Instance = new LinuxSystemInfo();
}
- else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ else if (OperatingSystem.IsMacOS())
{
- Instance = new MacOSSysteminfo();
+ Instance = new MacOSSystemInfo();
}
else
{