Added NVAPI report output.

This commit is contained in:
Michael Möller
2010-02-08 20:23:24 +00:00
parent 1fdd207910
commit 2e34c0a7b0
3 changed files with 13 additions and 3 deletions
+11 -1
View File
@@ -37,16 +37,22 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenHardwareMonitor.Hardware.Nvidia {
public class NvidiaGroup : IGroup {
private List<IHardware> hardware = new List<IHardware>();
private StringBuilder report = new StringBuilder();
public NvidiaGroup() {
if (!NVAPI.IsAvailable)
return;
report.AppendLine("NVAPI");
report.AppendLine();
NvPhysicalGpuHandle[] handles =
new NvPhysicalGpuHandle[NVAPI.MAX_PHYSICAL_GPUS];
@@ -54,6 +60,10 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
if (NVAPI.NvAPI_EnumPhysicalGPUs(handles, out count) != NvStatus.OK)
return;
report.Append("Number of GPUs: ");
report.AppendLine(count.ToString());
report.AppendLine();
for (int i = 0; i < count; i++) {
string gpuName;
NVAPI.NvAPI_GPU_GetFullName(handles[i], out gpuName);
@@ -69,7 +79,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
}
public string GetReport() {
return null;
return report.ToString();
}
public void Close() {