diff --git a/Hardware/ATI/ADL.cs b/Hardware/ATI/ADL.cs index 1da3f73..5931708 100644 --- a/Hardware/ATI/ADL.cs +++ b/Hardware/ATI/ADL.cs @@ -131,6 +131,18 @@ namespace OpenHardwareMonitor.Hardware.ATI { public int VDDCI; } + [StructLayout(LayoutKind.Sequential)] + internal struct ADLVersionsInfo { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string DriverVersion; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string CatalystVersion; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string CatalystWebLink; + } + internal enum ADLODNCurrentPowerType { TOTAL_POWER = 0, PPT_POWER, @@ -357,6 +369,8 @@ namespace OpenHardwareMonitor.Hardware.ATI { public delegate ADLStatus ADL2_OverdriveN_PerformanceStatus_GetDelegate( IntPtr context, int adapterIndex, out ADLODNPerformanceStatus performanceStatus); + public delegate ADLStatus ADL_Graphics_Versions_GetDelegate( + out ADLVersionsInfo versionInfo); private static ADL_Main_Control_CreateDelegate _ADL_Main_Control_Create; @@ -401,6 +415,8 @@ namespace OpenHardwareMonitor.Hardware.ATI { ADL_Overdrive5_ODParameters_Get; public static ADL2_OverdriveN_PerformanceStatus_GetDelegate ADL2_OverdriveN_PerformanceStatus_Get; + public static ADL_Graphics_Versions_GetDelegate + ADL_Graphics_Versions_Get; private static string dllName; @@ -463,6 +479,8 @@ namespace OpenHardwareMonitor.Hardware.ATI { out ADL_Overdrive5_ODParameters_Get); GetDelegate("ADL2_OverdriveN_PerformanceStatus_Get", out ADL2_OverdriveN_PerformanceStatus_Get); + GetDelegate("ADL_Graphics_Versions_Get", + out ADL_Graphics_Versions_Get); } static ADL() { diff --git a/Hardware/ATI/ATIGPU.cs b/Hardware/ATI/ATIGPU.cs index 83ca2c9..1347d87 100644 --- a/Hardware/ATI/ATIGPU.cs +++ b/Hardware/ATI/ATIGPU.cs @@ -563,8 +563,12 @@ namespace OpenHardwareMonitor.Hardware.ATI { coreVoltage.Value = null; } - coreLoad.Value = Math.Min(adlp.ActivityPercent, 100); - ActivateSensor(coreLoad); + if (adlp.ActivityPercent >= 0 && adlp.ActivityPercent <= 100) { + coreLoad.Value = adlp.ActivityPercent; + ActivateSensor(coreLoad); + } else { + coreLoad.Value = null; + } } else { coreClock.Value = null; memoryClock.Value = null; diff --git a/Hardware/ATI/ATIGroup.cs b/Hardware/ATI/ATIGroup.cs index f2a5a79..4a5233b 100644 --- a/Hardware/ATI/ATIGroup.cs +++ b/Hardware/ATI/ATIGroup.cs @@ -34,6 +34,25 @@ namespace OpenHardwareMonitor.Hardware.ATI { report.AppendLine(adl2Status.ToString()); report.AppendLine(); + report.AppendLine("Graphics Versions"); + report.AppendLine(); + try { + var status = ADL.ADL_Graphics_Versions_Get(out var versionInfo); + report.Append(" Status: "); + report.AppendLine(status.ToString()); + report.Append(" DriverVersion: "); + report.AppendLine(versionInfo.DriverVersion); + report.Append(" CatalystVersion: "); + report.AppendLine(versionInfo.CatalystVersion); + report.Append(" CatalystWebLink: "); + report.AppendLine(versionInfo.CatalystWebLink); + } catch (DllNotFoundException) { + report.AppendLine(" Status: DLL not found"); + } catch (Exception e) { + report.AppendLine(" Status: " + e.Message); + } + report.AppendLine(); + if (adlStatus == ADLStatus.OK) { int numberOfAdapters = 0; ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters); diff --git a/Properties/AssemblyVersion.cs b/Properties/AssemblyVersion.cs index 2c7fdba..a44214c 100644 --- a/Properties/AssemblyVersion.cs +++ b/Properties/AssemblyVersion.cs @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.9.2.2")] -[assembly: AssemblyInformationalVersion("0.9.2.2 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.9.2.3")] +[assembly: AssemblyInformationalVersion("0.9.2.3 Alpha")] \ No newline at end of file