mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Added old cpu temp reading as fallback
This commit is contained in:
@@ -41,10 +41,12 @@ public static class HardwareMonitor
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
cpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_CPU);
|
cpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_CPU);
|
||||||
/*
|
if (cpuTemp < 0)
|
||||||
var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true);
|
{
|
||||||
cpuTemp = ct.NextValue() - 273;
|
var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true);
|
||||||
ct.Dispose();*/
|
cpuTemp = ct.NextValue() - 273;
|
||||||
|
ct.Dispose();
|
||||||
|
}
|
||||||
} catch
|
} catch
|
||||||
{
|
{
|
||||||
Logger.WriteLine("Failed reading CPU temp");
|
Logger.WriteLine("Failed reading CPU temp");
|
||||||
|
|||||||
Reference in New Issue
Block a user