Skip to content

Commit 08a6834

Browse files
committed
[VIDEOPRT] Allow conflicting resources if this is the video base driver
CORE-18960
1 parent 84f423f commit 08a6834

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

win32ss/drivers/videoprt/resource.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,18 @@
2424
#define NDEBUG
2525
#include <debug.h>
2626

27+
extern BOOLEAN VpBaseVideo;
28+
2729
/* PRIVATE FUNCTIONS **********************************************************/
2830

31+
static BOOLEAN
32+
IntIsVgaSaveDriver(
33+
IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension)
34+
{
35+
UNICODE_STRING VgaSave = RTL_CONSTANT_STRING(L"\\Driver\\VgaSave");
36+
return RtlEqualUnicodeString(&VgaSave, &DeviceExtension->DriverObject->DriverName, TRUE);
37+
}
38+
2939
NTSTATUS NTAPI
3040
IntVideoPortGetLegacyResources(
3141
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
@@ -994,6 +1004,16 @@ VideoPortVerifyAccessRanges(
9941004

9951005
ExFreePoolWithTag(ResourceList, TAG_VIDEO_PORT);
9961006

1007+
/* If VgaSave driver is conflicting and we don't explicitely want
1008+
* to use it, ignore the problem (because win32k will try to use
1009+
* this driver only if all other ones are failing). */
1010+
if (Status == STATUS_CONFLICTING_ADDRESSES &&
1011+
IntIsVgaSaveDriver(DeviceExtension) &&
1012+
!VpBaseVideo)
1013+
{
1014+
return NO_ERROR;
1015+
}
1016+
9971017
if (!NT_SUCCESS(Status) || ConflictDetected)
9981018
return ERROR_INVALID_PARAMETER;
9991019
else

0 commit comments

Comments
 (0)