mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Experimental GPU overclock
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace NvAPIWrapper.Native.General.Structures
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct StructureVersion
|
||||
{
|
||||
private readonly uint _version;
|
||||
|
||||
public int VersionNumber
|
||||
{
|
||||
get => (int) (_version >> 16);
|
||||
}
|
||||
|
||||
public int StructureSize
|
||||
{
|
||||
get => (int) (_version & ~(0xFFFF << 16));
|
||||
}
|
||||
|
||||
public StructureVersion(int version, Type structureType)
|
||||
{
|
||||
_version = (uint) (Marshal.SizeOf(structureType) | (version << 16));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Structure Size: {StructureSize} Bytes, Version: {VersionNumber}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user