NVAPI interop struct packing improved.
This commit is contained in:
@@ -122,7 +122,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
|||||||
UNKNOWN = -1
|
UNKNOWN = -1
|
||||||
};
|
};
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 8)]
|
||||||
public struct NvSensor {
|
public struct NvSensor {
|
||||||
public NvThermalController Controller;
|
public NvThermalController Controller;
|
||||||
public int DefaultMinTemp;
|
public int DefaultMinTemp;
|
||||||
@@ -131,7 +131,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
|||||||
public NvThermalTarget Target;
|
public NvThermalTarget Target;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 8)]
|
||||||
public struct NvGPUThermalSettings {
|
public struct NvGPUThermalSettings {
|
||||||
public int Version;
|
public int Version;
|
||||||
public int Count;
|
public int Count;
|
||||||
@@ -140,14 +140,14 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
|||||||
public NvSensor[] Sensor;
|
public NvSensor[] Sensor;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct NvDisplayHandle {
|
public struct NvDisplayHandle {
|
||||||
private int handle;
|
private IntPtr ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct NvPhysicalGpuHandle {
|
public struct NvPhysicalGpuHandle {
|
||||||
private int handle;
|
private IntPtr ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NVAPI {
|
public class NVAPI {
|
||||||
|
|||||||
@@ -69,5 +69,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.1.23.1")]
|
[assembly: AssemblyVersion("0.1.23.2")]
|
||||||
[assembly: AssemblyFileVersion("0.1.23.1")]
|
[assembly: AssemblyFileVersion("0.1.23.2")]
|
||||||
|
|||||||
Reference in New Issue
Block a user