https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d8b3402fe60d47fbd8bde…
commit d8b3402fe60d47fbd8bde77d3048249c3aaf71c7
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Apr 30 23:26:53 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Sat Apr 30 23:33:42 2022 +0200
[WIN32SS] In PDEVOBJ_vRefreshModeList, do not change current stored mode
When changing current devmode, we must not only change ppdev->pdmwDev
pointer, but also update lots of other structures. This work is done by
PDEVOBJ_lChangeDisplaySettings.
CORE-18169
---
win32ss/gdi/eng/pdevobj.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/win32ss/gdi/eng/pdevobj.c b/win32ss/gdi/eng/pdevobj.c
index 5ef22da825f..65469cfce76 100644
--- a/win32ss/gdi/eng/pdevobj.c
+++ b/win32ss/gdi/eng/pdevobj.c
@@ -379,7 +379,6 @@ PDEVOBJ_vRefreshModeList(
{
PGRAPHICS_DEVICE pGraphicsDevice;
PDEVMODEINFO pdminfo, pdmiNext;
- PDEVMODEW newDevMode;
/* Lock the PDEV */
EngAcquireSemaphore(ppdev->hsemDevLock);
@@ -398,12 +397,8 @@ PDEVOBJ_vRefreshModeList(
ExFreePoolWithTag(pGraphicsDevice->pDevModeList, GDITAG_GDEVICE);
pGraphicsDevice->pDevModeList = NULL;
- /* Search an available display mode */
- if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, ppdev->pdmwDev,
&newDevMode, TRUE))
- {
- ExFreePoolWithTag(ppdev->pdmwDev, GDITAG_DEVMODE);
- ppdev->pdmwDev = newDevMode;
- }
+ /* Update available display mode list */
+ LDEVOBJ_bBuildDevmodeList(pGraphicsDevice);
/* Unlock PDEV */
EngReleaseSemaphore(ppdev->hsemDevLock);