mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 14:37:45 +00:00
[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 r74404384affe098
Many thanks to the patches author Thomas Faber. cherry picked from commit 0.4.13-dev-456-g00e882c2b1
This commit is contained in:
parent
c49b6a4bd5
commit
ec3cc13ab0
|
@ -266,6 +266,7 @@ PDEVOBJ_vRefreshModeList(
|
||||||
PGRAPHICS_DEVICE pGraphicsDevice;
|
PGRAPHICS_DEVICE pGraphicsDevice;
|
||||||
PDEVMODEINFO pdminfo, pdmiNext;
|
PDEVMODEINFO pdminfo, pdmiNext;
|
||||||
DEVMODEW dmDefault;
|
DEVMODEW dmDefault;
|
||||||
|
DEVMODEW dmCurrent;
|
||||||
|
|
||||||
/* Lock the PDEV */
|
/* Lock the PDEV */
|
||||||
EngAcquireSemaphore(ppdev->hsemDevLock);
|
EngAcquireSemaphore(ppdev->hsemDevLock);
|
||||||
|
@ -274,6 +275,7 @@ PDEVOBJ_vRefreshModeList(
|
||||||
|
|
||||||
/* Remember our default mode */
|
/* Remember our default mode */
|
||||||
dmDefault = *pGraphicsDevice->pDevModeList[pGraphicsDevice->iDefaultMode].pdm;
|
dmDefault = *pGraphicsDevice->pDevModeList[pGraphicsDevice->iDefaultMode].pdm;
|
||||||
|
dmCurrent = *ppdev->pdmwDev;
|
||||||
|
|
||||||
/* Clear out the modes */
|
/* Clear out the modes */
|
||||||
for (pdminfo = pGraphicsDevice->pdevmodeInfo;
|
for (pdminfo = pGraphicsDevice->pdevmodeInfo;
|
||||||
|
@ -293,7 +295,7 @@ PDEVOBJ_vRefreshModeList(
|
||||||
DPRINT1("FIXME: EngpPopulateDeviceModeList failed, we just destroyed a perfectly good mode list\n");
|
DPRINT1("FIXME: EngpPopulateDeviceModeList failed, we just destroyed a perfectly good mode list\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ppdev->pdmwDev = pGraphicsDevice->pDevModeList[pGraphicsDevice->iCurrentMode].pdm;
|
ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, &dmCurrent);
|
||||||
|
|
||||||
/* Unlock PDEV */
|
/* Unlock PDEV */
|
||||||
EngReleaseSemaphore(ppdev->hsemDevLock);
|
EngReleaseSemaphore(ppdev->hsemDevLock);
|
||||||
|
|
Loading…
Reference in a new issue