https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c3da00c42c472d07f7a4a4c02d6907ad2956ea66

commit c3da00c42c472d07f7a4a4c02d6907ad2956ea66
Author:     Hervé Poussineau <hpous...@reactos.org>
AuthorDate: Sat Jun 19 17:58:04 2021 +0200
Commit:     Hervé Poussineau <hpous...@reactos.org>
CommitDate: Sat Jul 10 16:27:44 2021 +0200

    [DESK] Start video card after its installation + let win32k detect it
---
 dll/cpl/desk/classinst.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dll/cpl/desk/classinst.c b/dll/cpl/desk/classinst.c
index 4356046fb51..c178d162d5b 100644
--- a/dll/cpl/desk/classinst.c
+++ b/dll/cpl/desk/classinst.c
@@ -25,6 +25,7 @@ DisplayClassInstaller(
     TCHAR ServiceName[MAX_SERVICE_NAME_LEN];
     TCHAR DeviceName[12];
     SP_DRVINFO_DETAIL_DATA DriverInfoDetailData;
+    DISPLAY_DEVICE DisplayDevice;
     HKEY hDriverKey = INVALID_HANDLE_VALUE; /* SetupDiOpenDevRegKey returns 
INVALID_HANDLE_VALUE in case of error! */
     HKEY hSettingsKey = NULL;
     HKEY hServicesKey = NULL;
@@ -245,6 +246,18 @@ DisplayClassInstaller(
 
     /* FIXME: install OpenGLSoftwareSettings section */
 
+    /* Start the device */
+    if (!SetupDiRestartDevices(DeviceInfoSet, DeviceInfoData))
+    {
+        rc = GetLastError();
+        DPRINT1("SetupDiRestartDevices() failed with error 0x%lx\n", rc);
+        goto cleanup;
+    }
+
+    /* Reenumerate display devices ; this will rescan for potential new 
devices */
+    DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
+    EnumDisplayDevices(NULL, 0, &DisplayDevice, 0);
+
     rc = ERROR_SUCCESS;
 
 cleanup:

Reply via email to