https://git.reactos.org/?p=reactos.git;a=commitdiff;h=900beca021a677b2a3709…
commit 900beca021a677b2a3709f1a4621714db51aa779
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun May 22 14:13:48 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Sun May 22 17:32:08 2022 +0200
[WIN32SS] In LDEVOBJ_bGetClosestMode, search 60 Hz if everything failed
This function needs probably to be rewritten.
---
win32ss/gdi/eng/ldevobj.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/win32ss/gdi/eng/ldevobj.c b/win32ss/gdi/eng/ldevobj.c
index cb6a8bbbe32..4a929ec4d24 100644
--- a/win32ss/gdi/eng/ldevobj.c
+++ b/win32ss/gdi/eng/ldevobj.c
@@ -688,6 +688,15 @@ LDEVOBJ_bGetClosestMode(
if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode, pSelectedMode,
FALSE))
return TRUE;
+ /* Search 60 Hz (if not already specified) */
+ if (!(RequestedMode->dmFields & DM_DISPLAYFREQUENCY))
+ {
+ RequestedMode->dmDisplayFrequency = 60;
+ RequestedMode->dmFields |= DM_DISPLAYFREQUENCY;
+ if (LDEVOBJ_bProbeAndCaptureDevmode(pGraphicsDevice, RequestedMode,
pSelectedMode, FALSE))
+ return TRUE;
+ }
+
/* Fall back to first mode */
WARN("Fall back to first available mode\n");
*pSelectedMode = pGraphicsDevice->pDevModeList[0].pdm;