Skip to content

Commit 42914af

Browse files
committed
[WIN32SS:ENG] Only accept VGASave service (ie vga.sys driver) as the real VGA device
CORE-19796
1 parent b4e781d commit 42914af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

win32ss/gdi/eng/device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ EngpHasVgaDriver(
9494
return FALSE;
9595
}
9696

97-
/* Device is using VGA driver if service name starts with 'VGA' (case insensitive) */
98-
return (_wcsnicmp(awcServiceName, L"VGA", 3) == 0);
97+
/* Device is using VGA driver if service name is 'VGASave' (case insensitive) */
98+
return (_wcsicmp(awcServiceName, L"VGASave") == 0);
9999
}
100100

101101
/*
@@ -242,7 +242,7 @@ EngpUpdateGraphicsDeviceList(VOID)
242242
if (pGraphicsDevice->StateFlags & DISPLAY_DEVICE_VGA_COMPATIBLE)
243243
{
244244
/* Save this as the VGA adapter */
245-
if (!gpVgaGraphicsDevice)
245+
if (!gpVgaGraphicsDevice || !EngpHasVgaDriver(gpVgaGraphicsDevice))
246246
{
247247
gpVgaGraphicsDevice = pGraphicsDevice;
248248
TRACE("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice);

0 commit comments

Comments
 (0)