feat: add display state management with serialization and mode change deferral, remove use of registry for fetching display paths

This commit is contained in:
Nguyen Duy
2026-05-14 15:18:07 +07:00
parent d14c62abe3
commit 352e9e20d4
2 changed files with 209 additions and 110 deletions
-18
View File
@@ -156,18 +156,6 @@ namespace ParsecVDisplay
return Status.UNKNOWN;
}
public static string GetDeviceDescription(uint devInst)
{
uint propType;
int length = 128 * sizeof(ushort);
var buffer = stackalloc byte[length];
Native.CM_Get_DevNode_PropertyW(devInst,
ref Native.DEVPROPKEY.Device_DeviceDesc, &propType, buffer, &length, 0);
return Marshal.PtrToStringUni((IntPtr)buffer);
}
public static DateTime GetDeviceLastArrival(uint devInst)
{
uint propType;
@@ -383,12 +371,6 @@ namespace ParsecVDisplay
pid = 102,
};
public static DEVPROPKEY Device_DeviceDesc = new DEVPROPKEY
{
fmtid = Guid.Parse("{A45C254E-DF1C-4EFD-8020-67D146A850E0}"),
pid = 2
};
public static DEVPROPKEY Device_DriverVersion = new DEVPROPKEY
{
fmtid = Guid.Parse("{A8B865DD-2E3D-4094-AD97-E593A70C75D6}"),