mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Gamma Init
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using WindowsDisplayAPI.Native.Structures;
|
||||
|
||||
namespace WindowsDisplayAPI.Native.DisplayConfig.Structures
|
||||
{
|
||||
// https://msdn.microsoft.com/en-us/library/vs/alm/ff553981(v=vs.85).aspx
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct DisplayConfigSetTargetPersistence
|
||||
{
|
||||
// ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable
|
||||
[MarshalAs(UnmanagedType.Struct)] private readonly DisplayConfigDeviceInfoHeader _Header;
|
||||
[MarshalAs(UnmanagedType.U4)] private readonly uint _BootPersistenceOn;
|
||||
|
||||
public bool BootPersistence
|
||||
{
|
||||
get => _BootPersistenceOn > 0;
|
||||
}
|
||||
|
||||
public DisplayConfigSetTargetPersistence(LUID adapter, uint targetId, bool bootPersistence) : this()
|
||||
{
|
||||
_Header = new DisplayConfigDeviceInfoHeader(adapter, targetId, GetType());
|
||||
_BootPersistenceOn = bootPersistence ? 1u : 0u;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user