Fintek super I/O chips with base address 0x..5 are detected now as well. Set Pack = 1 for NVAPI struct interop (should fix GPU enumeration).

This commit is contained in:
Michael Möller
2010-02-22 09:57:02 +00:00
parent 6df0210230
commit 2cde9eff61
4 changed files with 20 additions and 11 deletions
+10 -3
View File
@@ -206,17 +206,24 @@ namespace OpenHardwareMonitor.Hardware.LPC {
if (chip != Chip.Unknown) {
Select(logicalDeviceNumber);
ushort address = ReadWord(BASE_ADDRESS_REGISTER);
ushort address = ReadWord(BASE_ADDRESS_REGISTER);
Thread.Sleep(1);
ushort verify = ReadWord(BASE_ADDRESS_REGISTER);
ushort vendorID = 0;
if (chip == Chip.F71862 || chip == Chip.F71882 || chip == Chip.F71889)
vendorID = ReadWord(FINTEK_VENDOR_ID_REGISTER);
WinbondFintekExit();
if (address != verify || address < 0x100 || (address & 0xF007) != 0)
if (address != verify)
return;
// some Fintek chips have address register offset 0x05 added already
if ((address & 0x07) == 0x05)
address &= 0xFFF8;
if (address < 0x100 || (address & 0xF007) != 0)
return;
switch (chip) {
+4 -4
View File
@@ -122,7 +122,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
UNKNOWN = -1
};
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NvSensor {
public NvThermalController Controller;
public int DefaultMinTemp;
@@ -131,7 +131,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
public NvThermalTarget Target;
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NvGPUThermalSettings {
public int Version;
public int Count;
@@ -140,12 +140,12 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
public NvSensor[] Sensor;
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NvDisplayHandle {
private int handle;
}
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct NvPhysicalGpuHandle {
private int handle;
}
+4 -2
View File
@@ -4,7 +4,7 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F5E0C1F7-9E9B-46F2-AC88-8C9C1C923880}</ProjectGuid>
<ProductVersion>9.0.30729</ProductVersion>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>WinExe</OutputType>
<NoStandardLibraries>false</NoStandardLibraries>
@@ -68,7 +68,6 @@
<Compile Include="Hardware\HDD\HDD.cs" />
<Compile Include="Hardware\HDD\HDDGroup.cs" />
<Compile Include="Hardware\HDD\SMART.cs" />
<Compile Include="Hardware\IParameter.cs" />
<Compile Include="Hardware\LPC\Chip.cs" />
<Compile Include="Hardware\LPC\F718XX.cs" />
<Compile Include="Hardware\LPC\LPCHardware.cs" />
@@ -124,12 +123,15 @@
<ItemGroup>
<EmbeddedResource Include="GUI\AboutBox.resx">
<DependentUpon>AboutBox.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="GUI\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="GUI\PlotPanel.resx">
<DependentUpon>PlotPanel.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\ati.png">
</EmbeddedResource>
+2 -2
View File
@@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.23.0")]
[assembly: AssemblyFileVersion("0.1.23.0")]
[assembly: AssemblyVersion("0.1.23.1")]
[assembly: AssemblyFileVersion("0.1.23.1")]