mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 22:12:05 +00: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:
parent
177cbd81af
commit
cfde03ec9b
1 changed files with 18 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue