[DESK] Start video card after its installation + let win32k detect it
[reactos.git] / dll / cpl / desk / classinst.c
index 4356046..c178d16 100644 (file)
@@ -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: