From 39d8a822d258b9c61faee80bdf6d9621976eea59 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 13 Jul 2021 08:29:11 +0200 Subject: [PATCH] [WIN32K] Fix detection of multiple display devices on VBox --- win32ss/gdi/eng/device.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/win32ss/gdi/eng/device.c b/win32ss/gdi/eng/device.c index 46b9716016f..deca6e7a9ff 100644 --- a/win32ss/gdi/eng/device.c +++ b/win32ss/gdi/eng/device.c @@ -92,14 +92,16 @@ EngpUpdateGraphicsDeviceList(VOID) { /* Save this as the VGA adapter */ if (!gpVgaGraphicsDevice) + { gpVgaGraphicsDevice = pGraphicsDevice; - TRACE("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice); + TRACE("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice); + } } - else + + /* Set the first one as primary device */ + if (!gpPrimaryGraphicsDevice) { - /* Set the first one as primary device */ - if (!gpPrimaryGraphicsDevice) - gpPrimaryGraphicsDevice = pGraphicsDevice; + gpPrimaryGraphicsDevice = pGraphicsDevice; TRACE("gpPrimaryGraphicsDevice = %p\n", gpPrimaryGraphicsDevice); } }