Get once no need

This commit is contained in:
sunshineinabox 2023-07-26 21:04:45 -07:00
parent 5618760299
commit 36434edb47

View file

@ -8,16 +8,16 @@ using System.Linq;
namespace Ryujinx.Common.SystemInfo namespace Ryujinx.Common.SystemInfo
{ {
[SupportedOSPlatform("windows")] [SupportedOSPlatform("windows")]
partial class WindowsSystemInfo : SystemInfo class WindowsSystemInfo : SystemInfo
{ {
internal WindowsSystemInfo() internal WindowsSystemInfo()
{ {
try try
{ {
using (WmiConnection connection = new WmiConnection()) using (WmiConnection connection = new())
{ {
(string cpuName, int physicalCores) = GetCpuStatsLight(connection); (string cpuName, PhysicalCores) = GetCpuStatsLight(connection);
CpuName = $"{cpuName} ; {physicalCores} physical ; {LogicalCoreCount} logical"; CpuName = $"{cpuName} ; {PhysicalCores} physical ; {LogicalCoreCount} logical";
(RamTotal, RamAvailable) = GetMemoryStatsWmiLight(connection); (RamTotal, RamAvailable) = GetMemoryStatsWmiLight(connection);
} }
} }