Fixed Issue 209.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Michael Möller <m.moeller@gmx.ch>.
|
||||
Portions created by the Initial Developer are Copyright (C) 2009-2011
|
||||
Portions created by the Initial Developer are Copyright (C) 2009-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -299,6 +299,9 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
nvDisplayDriverVersion);
|
||||
public delegate NvStatus NvAPI_GetInterfaceVersionStringDelegate(
|
||||
StringBuilder version);
|
||||
public delegate NvStatus NvAPI_GPU_GetPCIIdentifiersDelegate(
|
||||
NvPhysicalGpuHandle gpuHandle, out uint deviceId, out uint subSystemId,
|
||||
out uint revisionId, out uint extDeviceId);
|
||||
|
||||
private static readonly bool available;
|
||||
private static readonly nvapi_QueryInterfaceDelegate nvapi_QueryInterface;
|
||||
@@ -332,6 +335,8 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
NvAPI_GPU_GetMemoryInfo;
|
||||
public static readonly NvAPI_GetDisplayDriverVersionDelegate
|
||||
NvAPI_GetDisplayDriverVersion;
|
||||
public static readonly NvAPI_GPU_GetPCIIdentifiersDelegate
|
||||
NvAPI_GPU_GetPCIIdentifiers;
|
||||
|
||||
private NVAPI() { }
|
||||
|
||||
@@ -406,6 +411,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
GetDelegate(0x774AA982, out NvAPI_GPU_GetMemoryInfo);
|
||||
GetDelegate(0xF951A4D1, out NvAPI_GetDisplayDriverVersion);
|
||||
GetDelegate(0x01053FA5, out _NvAPI_GetInterfaceVersionString);
|
||||
GetDelegate(0x2DDFB66E, out NvAPI_GPU_GetPCIIdentifiers);
|
||||
|
||||
available = true;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Michael Möller <m.moeller@gmx.ch>.
|
||||
Portions created by the Initial Developer are Copyright (C) 2009-2011
|
||||
Portions created by the Initial Developer are Copyright (C) 2009-2012
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -265,6 +265,25 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
}
|
||||
r.AppendLine();
|
||||
|
||||
if (NVAPI.NvAPI_GPU_GetPCIIdentifiers != null) {
|
||||
uint deviceId, subSystemId, revisionId, extDeviceId;
|
||||
|
||||
NvStatus status = NVAPI.NvAPI_GPU_GetPCIIdentifiers(handle,
|
||||
out deviceId, out subSystemId, out revisionId, out extDeviceId);
|
||||
|
||||
if (status == NvStatus.OK) {
|
||||
r.Append("DeviceID: 0x");
|
||||
r.AppendLine(deviceId.ToString("X", CultureInfo.InvariantCulture));
|
||||
r.Append("SubSystemID: 0x");
|
||||
r.AppendLine(subSystemId.ToString("X", CultureInfo.InvariantCulture));
|
||||
r.Append("RevisionID: 0x");
|
||||
r.AppendLine(revisionId.ToString("X", CultureInfo.InvariantCulture));
|
||||
r.Append("ExtDeviceID: 0x");
|
||||
r.AppendLine(extDeviceId.ToString("X", CultureInfo.InvariantCulture));
|
||||
r.AppendLine();
|
||||
}
|
||||
}
|
||||
|
||||
if (NVAPI.NvAPI_GPU_GetThermalSettings != null) {
|
||||
NvGPUThermalSettings settings = new NvGPUThermalSettings();
|
||||
settings.Version = NVAPI.GPU_THERMAL_SETTINGS_VER;
|
||||
|
||||
Reference in New Issue
Block a user