From f1cafc2d6315d7b869713d15f2ad188e3dcde327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Wed, 10 Mar 2010 17:56:08 +0000 Subject: [PATCH] Fixed Issue 14 (ignore ATI GPU voltage and clock sensors if the value is 0). --- Hardware/ATI/ATIGPU.cs | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/Hardware/ATI/ATIGPU.cs b/Hardware/ATI/ATIGPU.cs index 9cd08fb..1144058 100644 --- a/Hardware/ATI/ATIGPU.cs +++ b/Hardware/ATI/ATIGPU.cs @@ -123,13 +123,22 @@ namespace OpenHardwareMonitor.Hardware.ATI { if (ADL.ADL_Overdrive5_CurrentActivity_Get(adapterIndex, ref adlp) == ADL.ADL_OK) { - coreClock.Value = 0.01f * adlp.EngineClock; - memoryClock.Value = 0.01f * adlp.MemoryClock; - coreVoltage.Value = 0.001f * adlp.Vddc; - coreLoad.Value = adlp.ActivityPercent; - ActivateSensor(coreClock); - ActivateSensor(memoryClock); - ActivateSensor(coreVoltage); + if (adlp.EngineClock > 0) { + coreClock.Value = 0.01f * adlp.EngineClock; + ActivateSensor(coreClock); + } + + if (adlp.MemoryClock > 0) { + memoryClock.Value = 0.01f * adlp.MemoryClock; + ActivateSensor(memoryClock); + } + + if (adlp.Vddc > 0) { + coreVoltage.Value = 0.001f * adlp.Vddc; + ActivateSensor(coreVoltage); + } + + coreLoad.Value = adlp.ActivityPercent; ActivateSensor(coreLoad); } else { DeactivateSensor(coreClock);