diff options
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 |
