mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-09-03 15:55:26 +00:00
NVAPI interop struct packing improved.
This commit is contained in:
@@ -122,7 +122,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
UNKNOWN = -1
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 8)]
|
||||
public struct NvSensor {
|
||||
public NvThermalController Controller;
|
||||
public int DefaultMinTemp;
|
||||
@@ -131,7 +131,7 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
public NvThermalTarget Target;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 8)]
|
||||
public struct NvGPUThermalSettings {
|
||||
public int Version;
|
||||
public int Count;
|
||||
@@ -140,14 +140,14 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
|
||||
public NvSensor[] Sensor;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NvDisplayHandle {
|
||||
private int handle;
|
||||
private IntPtr ptr;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NvPhysicalGpuHandle {
|
||||
private int handle;
|
||||
private IntPtr ptr;
|
||||
}
|
||||
|
||||
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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.1.23.1")]
|
||||
[assembly: AssemblyFileVersion("0.1.23.1")]
|
||||
[assembly: AssemblyVersion("0.1.23.2")]
|
||||
[assembly: AssemblyFileVersion("0.1.23.2")]
|
||||
|
Reference in New Issue
Block a user