File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ IntVideoPortChildQueryId(
121121{
122122 PWCHAR Buffer = NULL , StaticBuffer ;
123123 UNICODE_STRING UnicodeStr ;
124+ HANDLE hKey ;
125+ NTSTATUS Status ;
124126
125127 switch (IrpSp -> Parameters .QueryId .IdType )
126128 {
@@ -197,6 +199,22 @@ IntVideoPortChildQueryId(
197199 /* Add the second null terminator */
198200 Buffer [wcslen (StaticBuffer ) + 1 ] = UNICODE_NULL ;
199201 }
202+
203+ /* Try to write EDID to registry (ignore errors) */
204+ Status = IoOpenDeviceRegistryKey (ChildExtension -> PhysicalDeviceObject ,
205+ PLUGPLAY_REGKEY_DEVICE ,
206+ MAXIMUM_ALLOWED ,
207+ & hKey );
208+ if (NT_SUCCESS (Status ))
209+ {
210+ Status = RtlWriteRegistryValue (RTL_REGISTRY_HANDLE ,
211+ hKey ,
212+ ChildExtension -> EdidValid ? L"EDID" : L"BAD_EDID" ,
213+ REG_BINARY ,
214+ ChildExtension -> ChildDescriptor ,
215+ sizeof (ChildExtension -> ChildDescriptor ));
216+ ZwClose (hKey );
217+ }
200218 break ;
201219 default :
202220 ASSERT (FALSE);
You can’t perform that action at this time.
0 commit comments