# HG changeset patch # User moel.mich # Date 1265660604 0 # Node ID 2daf59392c887f39bd67939f42caa63e298f836d # Parent dc276daadb2c265627eaf1c9f2098a6f9b2d6d68 Added NVAPI report output. diff -r dc276daadb2c -r 2daf59392c88 Hardware/ATI/ATIGroup.cs --- a/Hardware/ATI/ATIGroup.cs Mon Feb 08 20:18:25 2010 +0000 +++ b/Hardware/ATI/ATIGroup.cs Mon Feb 08 20:23:24 2010 +0000 @@ -62,7 +62,7 @@ int numberOfAdapters = 0; ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters); - report.Append("Numer of adapters: "); + report.Append("Number of adapters: "); report.AppendLine(numberOfAdapters.ToString()); report.AppendLine(); diff -r dc276daadb2c -r 2daf59392c88 Hardware/CPU/CPUGroup.cs --- a/Hardware/CPU/CPUGroup.cs Mon Feb 08 20:18:25 2010 +0000 +++ b/Hardware/CPU/CPUGroup.cs Mon Feb 08 20:23:24 2010 +0000 @@ -111,7 +111,7 @@ AppendRegister(nameBuilder, edx); } } - cpuBrandString = nameBuilder.ToString().Trim('\0'); + cpuBrandString = nameBuilder.ToString().Trim('\0').Trim(); nameBuilder.Replace("(R)", " "); nameBuilder.Replace("(TM)", " "); nameBuilder.Replace("(tm)", " "); diff -r dc276daadb2c -r 2daf59392c88 Hardware/Nvidia/NvidiaGroup.cs --- a/Hardware/Nvidia/NvidiaGroup.cs Mon Feb 08 20:18:25 2010 +0000 +++ b/Hardware/Nvidia/NvidiaGroup.cs Mon Feb 08 20:23:24 2010 +0000 @@ -37,16 +37,22 @@ using System; using System.Collections.Generic; +using System.Text; namespace OpenHardwareMonitor.Hardware.Nvidia { public class NvidiaGroup : IGroup { + private List hardware = new List(); + 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 @@ 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 @@ } public string GetReport() { - return null; + return report.ToString(); } public void Close() {