diff options
| author | Mary <57835969+h1k421@users.noreply.github.com> | 2020-05-04 04:15:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-04 12:15:27 +1000 |
| commit | 651a07c6c2a3e89c059d56e916c45e1881d56abc (patch) | |
| tree | c53cd1f08b93e363fa838ad5e5643ba47f7bd734 /Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs | |
| parent | 4c54f36c380683ef4575becf516953b7b0dfd6fc (diff) | |
Refactor SystemInfo and implement macOS system info backend (#1177)
Diffstat (limited to 'Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs')
| -rw-r--r-- | Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs b/Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs new file mode 100644 index 00000000..1d4e61fa --- /dev/null +++ b/Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs @@ -0,0 +1,23 @@ +using System.Management; + +namespace Ryujinx.Common.SystemInfo +{ + internal class WindowsSysteminfo : SystemInfo + { + public override string CpuName { get; } + public override ulong RamSize { get; } + + public WindowsSysteminfo() + { + foreach (ManagementBaseObject mObject in new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_Processor").Get()) + { + CpuName = mObject["Name"].ToString(); + } + + foreach (ManagementBaseObject mObject in new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_OperatingSystem").Get()) + { + RamSize = ulong.Parse(mObject["TotalVisibleMemorySize"].ToString()) * 1024; + } + } + } +}
\ No newline at end of file |
