mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 06:28:34 +00:00
[WIN32K:ENG] In PDEVOBJ_vRefreshModeList, find a proper match for the current display mode instead of assuming a constant index. CORE-15325
This commit is contained in:
parent
28ed2347ef
commit
00e882c2b1
1 changed files with 3 additions and 1 deletions
|
@ -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