https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1d66a0aa19b534329ceae…
commit 1d66a0aa19b534329ceae990d3beeca2ed824ac1
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Apr 30 13:57:54 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Sat Apr 30 14:05:05 2022 +0200
[DESK] Remove call to SetupDiRestartDevices()
This effectively reverts a6005299c685bb7669ad7ecb1d9c765bcc494c08, and
parts of c3da00c42c472d07f7a4a4c02d6907ad2956ea66.
This call is not required, as umpnpmgr already does what is needed.
However, keep the call to EnumDisplayDevices(), so win32k knows that a
new graphic card has been installed.
CORE-18168
---
dll/cpl/desk/classinst.c | 32 +++-----------------------------
1 file changed, 3 insertions(+), 29 deletions(-)
diff --git a/dll/cpl/desk/classinst.c b/dll/cpl/desk/classinst.c
index 2c73aced777..c0038cfa635 100644
--- a/dll/cpl/desk/classinst.c
+++ b/dll/cpl/desk/classinst.c
@@ -246,35 +246,9 @@ DisplayClassInstaller(
/* FIXME: install OpenGLSoftwareSettings section */
- /* Start the device */
- if (SetupDiRestartDevices(DeviceInfoSet, DeviceInfoData))
- {
- /* Reenumerate display devices ; this will rescan for potential new devices */
- DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
- EnumDisplayDevices(NULL, 0, &DisplayDevice, 0);
- }
- else
- {
- rc = GetLastError();
- DPRINT("SetupDiRestartDevices() failed with error 0x%lx. Will reboot
later.\n", rc);
-
- /* Mark device as needing a restart */
- InstallParams.cbSize = sizeof(InstallParams);
- if (!SetupDiGetDeviceInstallParams(DeviceInfoSet, DeviceInfoData,
&InstallParams))
- {
- rc = GetLastError();
- DPRINT("SetupDiGetDeviceInstallParams() failed with error 0x%lx\n",
rc);
- goto cleanup;
- }
- InstallParams.Flags |= DI_NEEDRESTART;
- result = SetupDiSetDeviceInstallParams(DeviceInfoSet, DeviceInfoData,
&InstallParams);
- if (!result)
- {
- rc = GetLastError();
- DPRINT("SetupDiSetDeviceInstallParams() 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;