Added NVAPI report output.
authormoel.mich
Mon, 08 Feb 2010 20:23:24 +0000
changeset 352daf59392c88
parent 34 dc276daadb2c
child 36 32adc68f54f8
Added NVAPI report output.
Hardware/ATI/ATIGroup.cs
Hardware/CPU/CPUGroup.cs
Hardware/Nvidia/NvidiaGroup.cs
     1.1 --- a/Hardware/ATI/ATIGroup.cs	Mon Feb 08 20:18:25 2010 +0000
     1.2 +++ b/Hardware/ATI/ATIGroup.cs	Mon Feb 08 20:23:24 2010 +0000
     1.3 @@ -62,7 +62,7 @@
     1.4            int numberOfAdapters = 0;
     1.5            ADL.ADL_Adapter_NumberOfAdapters_Get(ref numberOfAdapters);
     1.6            
     1.7 -          report.Append("Numer of adapters: "); 
     1.8 +          report.Append("Number of adapters: "); 
     1.9            report.AppendLine(numberOfAdapters.ToString());
    1.10            report.AppendLine();
    1.11  
     2.1 --- a/Hardware/CPU/CPUGroup.cs	Mon Feb 08 20:18:25 2010 +0000
     2.2 +++ b/Hardware/CPU/CPUGroup.cs	Mon Feb 08 20:23:24 2010 +0000
     2.3 @@ -111,7 +111,7 @@
     2.4              AppendRegister(nameBuilder, edx);
     2.5            }
     2.6          }
     2.7 -        cpuBrandString = nameBuilder.ToString().Trim('\0');
     2.8 +        cpuBrandString = nameBuilder.ToString().Trim('\0').Trim();
     2.9          nameBuilder.Replace("(R)", " ");
    2.10          nameBuilder.Replace("(TM)", " ");
    2.11          nameBuilder.Replace("(tm)", " ");
     3.1 --- a/Hardware/Nvidia/NvidiaGroup.cs	Mon Feb 08 20:18:25 2010 +0000
     3.2 +++ b/Hardware/Nvidia/NvidiaGroup.cs	Mon Feb 08 20:23:24 2010 +0000
     3.3 @@ -37,16 +37,22 @@
     3.4  
     3.5  using System;
     3.6  using System.Collections.Generic;
     3.7 +using System.Text;
     3.8  
     3.9  namespace OpenHardwareMonitor.Hardware.Nvidia {
    3.10  
    3.11    public class NvidiaGroup : IGroup {
    3.12 +   
    3.13      private List<IHardware> hardware = new List<IHardware>();
    3.14 +    private StringBuilder report = new StringBuilder();
    3.15  
    3.16      public NvidiaGroup() {
    3.17        if (!NVAPI.IsAvailable)
    3.18          return;
    3.19  
    3.20 +      report.AppendLine("NVAPI");
    3.21 +      report.AppendLine();
    3.22 +
    3.23        NvPhysicalGpuHandle[] handles = 
    3.24          new NvPhysicalGpuHandle[NVAPI.MAX_PHYSICAL_GPUS];
    3.25    
    3.26 @@ -54,6 +60,10 @@
    3.27        if (NVAPI.NvAPI_EnumPhysicalGPUs(handles, out count) != NvStatus.OK)
    3.28          return;
    3.29  
    3.30 +      report.Append("Number of GPUs: ");
    3.31 +      report.AppendLine(count.ToString());
    3.32 +      report.AppendLine();
    3.33 +
    3.34        for (int i = 0; i < count; i++) {
    3.35          string gpuName;
    3.36          NVAPI.NvAPI_GPU_GetFullName(handles[i], out gpuName);
    3.37 @@ -69,7 +79,7 @@
    3.38      }
    3.39  
    3.40      public string GetReport() {
    3.41 -      return null;
    3.42 +      return report.ToString();
    3.43      }
    3.44  
    3.45      public void Close() {