mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[VIDEOPRT] Write monitor EDID to registry
This will be used later by win32k to give only valid display modes to user mode.
This commit is contained in:
@@ -121,6 +121,8 @@ IntVideoPortChildQueryId(
|
||||
{
|
||||
PWCHAR Buffer = NULL, StaticBuffer;
|
||||
UNICODE_STRING UnicodeStr;
|
||||
HANDLE hKey;
|
||||
NTSTATUS Status;
|
||||
|
||||
switch (IrpSp->Parameters.QueryId.IdType)
|
||||
{
|
||||
@@ -197,6 +199,22 @@ IntVideoPortChildQueryId(
|
||||
/* Add the second null terminator */
|
||||
Buffer[wcslen(StaticBuffer) + 1] = UNICODE_NULL;
|
||||
}
|
||||
|
||||
/* Try to write EDID to registry (ignore errors) */
|
||||
Status = IoOpenDeviceRegistryKey(ChildExtension->PhysicalDeviceObject,
|
||||
PLUGPLAY_REGKEY_DEVICE,
|
||||
MAXIMUM_ALLOWED,
|
||||
&hKey);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Status = RtlWriteRegistryValue(RTL_REGISTRY_HANDLE,
|
||||
hKey,
|
||||
ChildExtension->EdidValid ? L"EDID" : L"BAD_EDID",
|
||||
REG_BINARY,
|
||||
ChildExtension->ChildDescriptor,
|
||||
sizeof(ChildExtension->ChildDescriptor));
|
||||
ZwClose(hKey);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(FALSE);
|
||||
|
||||
Reference in New Issue
Block a user