0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Common/SystemInfo/WindowsSystemInfo.cs

23 lines
No EOL
761 B
C#

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;
}
}
}
}