[BLUE] Fix a visual regression introduced in bfd8a848: Don't touch INBV when resetting internal screen state during driver loading.

This commit is contained in:
Hermès Bélusca-Maïto 2019-12-24 16:13:10 +01:00
parent 18a51dc7f5
commit 1928e170f2
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -279,9 +279,12 @@ ScrInbvCleanup(VOID)
// HANDLE ThreadHandle;
// ResetDisplayParametersDeviceExtension = NULL;
InbvNotifyDisplayOwnershipLost(NULL);
ScrResetDisplayParametersEx(80, 50, FALSE);
// or InbvAcquireDisplayOwnership(); ?
if (ResetDisplayParametersDeviceExtension)
{
InbvNotifyDisplayOwnershipLost(NULL);
ScrResetDisplayParametersEx(80, 50, FALSE);
// or InbvAcquireDisplayOwnership(); ?
}
#if 0
// TODO: Find the best way to communicate the request.
@ -1323,9 +1326,10 @@ DriverEntry(
Status = IoCreateSymbolicLink(&SymlinkName, &DeviceName);
if (NT_SUCCESS(Status))
{
/* By default disable the screen */
ResetDisplayParametersDeviceExtension = DeviceObject->DeviceExtension;
/* By default disable the screen (but don't touch INBV: ResetDisplayParametersDeviceExtension is still NULL) */
ScrResetScreen(DeviceObject->DeviceExtension, TRUE, FALSE);
/* Now set ResetDisplayParametersDeviceExtension to enable synchronizing with INBV */
ResetDisplayParametersDeviceExtension = DeviceObject->DeviceExtension;
DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
}
else