diff --git a/ProjBobcat/ProjBobcat/Platforms/Windows/SystemInfoHelper.Windows.cs b/ProjBobcat/ProjBobcat/Platforms/Windows/SystemInfoHelper.Windows.cs index 3ff3507..e7a549e 100644 --- a/ProjBobcat/ProjBobcat/Platforms/Windows/SystemInfoHelper.Windows.cs +++ b/ProjBobcat/ProjBobcat/Platforms/Windows/SystemInfoHelper.Windows.cs @@ -17,7 +17,7 @@ public static class SystemInfoHelper { static readonly PerformanceCounter FreeMemCounter = new("Memory", "Available MBytes"); static readonly PerformanceCounter MemUsagePercentageCounter = new("Memory", "% Committed Bytes In Use"); - static readonly PerformanceCounter CpuCounter = new("Processor", "% Processor Time", "_Total"); + static readonly PerformanceCounter CpuCounter = new("Processor Information", "% Processor Utility", "_Total"); static SystemInfoHelper() { @@ -125,8 +125,12 @@ static AppxPackageInfo SetAppxPackageInfoProperty(AppxPackageInfo appxPackageInf "NonRemovable" => appxPackageInfo with { NonRemovable = Convert.ToBoolean(value) }, "Dependencies" => appxPackageInfo with { - Dependencies = value.TrimStart('{').TrimEnd('}').Split(',') - .Select(s => s.Trim()).ToArray() + Dependencies = value + .TrimStart('{') + .TrimEnd('}') + .Split(',') + .Select(s => s.Trim()) + .ToArray() }, "IsPartiallyStaged" => appxPackageInfo with { IsPartiallyStaged = Convert.ToBoolean(value) }, "SignatureKind" => appxPackageInfo with { SignatureKind = value }, @@ -226,7 +230,7 @@ public static MemoryInfo GetWindowsMemoryStatus() /// public static CPUInfo GetWindowsCpuUsage() { - var percentage = CpuCounter.NextValue(); + var percentage = CpuCounter.NextValue() / Environment.ProcessorCount * 100; return new CPUInfo {