Skip to content

Commit ec3cc13

Browse files
committed
[0.4.12][WIN32K:ENG] Fix fullscreen switch regressions CORE-15325 & CORE-14684 PR#1659
In PDEVOBJ_vRefreshModeList, find a proper match for the current display mode instead of assuming a constant index. Both tickets regressed by SVN r74404 384affe Many thanks to the patches author Thomas Faber. cherry picked from commit 0.4.13-dev-456-g 00e882c
1 parent c49b6a4 commit ec3cc13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

win32ss/gdi/eng/pdevobj.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ PDEVOBJ_vRefreshModeList(
266266
PGRAPHICS_DEVICE pGraphicsDevice;
267267
PDEVMODEINFO pdminfo, pdmiNext;
268268
DEVMODEW dmDefault;
269+
DEVMODEW dmCurrent;
269270

270271
/* Lock the PDEV */
271272
EngAcquireSemaphore(ppdev->hsemDevLock);
@@ -274,6 +275,7 @@ PDEVOBJ_vRefreshModeList(
274275

275276
/* Remember our default mode */
276277
dmDefault = *pGraphicsDevice->pDevModeList[pGraphicsDevice->iDefaultMode].pdm;
278+
dmCurrent = *ppdev->pdmwDev;
277279

278280
/* Clear out the modes */
279281
for (pdminfo = pGraphicsDevice->pdevmodeInfo;
@@ -293,7 +295,7 @@ PDEVOBJ_vRefreshModeList(
293295
DPRINT1("FIXME: EngpPopulateDeviceModeList failed, we just destroyed a perfectly good mode list\n");
294296
}
295297

296-
ppdev->pdmwDev = pGraphicsDevice->pDevModeList[pGraphicsDevice->iCurrentMode].pdm;
298+
ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, &dmCurrent);
297299

298300
/* Unlock PDEV */
299301
EngReleaseSemaphore(ppdev->hsemDevLock);

0 commit comments

Comments
 (0)