Added ADL (AMD Display Library) overdrive version to the report.

This commit is contained in:
Michael Möller 2020-02-27 22:48:26 +01:00
parent 165be259c6
commit e3919ece28

View File

@ -10,6 +10,7 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Text;
namespace OpenHardwareMonitor.Hardware.ATI { namespace OpenHardwareMonitor.Hardware.ATI {
internal sealed class ATIGPU : Hardware { internal sealed class ATIGPU : Hardware {
@ -166,6 +167,36 @@ namespace OpenHardwareMonitor.Hardware.ATI {
} }
public override string GetReport() {
var r = new StringBuilder();
r.AppendLine("AMD GPU");
r.AppendLine();
r.Append("AdapterIndex: ");
r.AppendLine(adapterIndex.ToString(CultureInfo.InvariantCulture));
r.AppendLine();
r.AppendLine("ADL Overdrive");
r.AppendLine();
int status = ADL.ADL_Overdrive_Caps(adapterIndex,
out int supported, out int enabled, out int version);
r.Append(" Status: ");
r.AppendLine(status == ADL.ADL_OK ? "OK" :
status.ToString(CultureInfo.InvariantCulture));
r.Append(" Supported: ");
r.AppendLine(supported.ToString(CultureInfo.InvariantCulture));
r.Append(" Enabled: ");
r.AppendLine(enabled.ToString(CultureInfo.InvariantCulture));
r.Append(" Version: ");
r.AppendLine(version.ToString(CultureInfo.InvariantCulture));
r.AppendLine();
return r.ToString();
}
public override void Update() { public override void Update() {
if (context != IntPtr.Zero && overdriveVersion >= 7) { if (context != IntPtr.Zero && overdriveVersion >= 7) {
GetODNTemperature(ADLODNTemperatureType.CORE, temperatureCore); GetODNTemperature(ADLODNTemperatureType.CORE, temperatureCore);