https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2f2795ab4cf7fdddf6c9d…
commit 2f2795ab4cf7fdddf6c9d88d885a338a7678a888
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Wed Apr 20 18:23:23 2022 +0200
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Wed Apr 20 18:23:53 2022 +0200
[DESK] Correctly store display frequency, so we can rollback in case of error
---
dll/cpl/desk/settings.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dll/cpl/desk/settings.c b/dll/cpl/desk/settings.c
index fb8a2d475f5..93d8b9a246f 100644
--- a/dll/cpl/desk/settings.c
+++ b/dll/cpl/desk/settings.c
@@ -191,6 +191,7 @@ AddDisplayDevice(IN PSETTINGS_DATA pData, IN const DISPLAY_DEVICE
*DisplayDevice
newEntry->InitialSettings.dmPelsWidth =
newEntry->CurrentSettings->dmPelsWidth;
newEntry->InitialSettings.dmPelsHeight =
newEntry->CurrentSettings->dmPelsHeight;
newEntry->InitialSettings.dmBitsPerPel =
newEntry->CurrentSettings->dmBitsPerPel;
+ newEntry->InitialSettings.dmDisplayFrequency =
newEntry->CurrentSettings->dmDisplayFrequency;
/* Count different resolutions */
for (Current = newEntry->Settings; Current != NULL; Current = Current->Flink)
@@ -770,6 +771,7 @@ ApplyDisplaySettings(HWND hwndDlg, PSETTINGS_DATA pData)
pData->CurrentDisplayDevice->InitialSettings.dmPelsWidth =
pData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth;
pData->CurrentDisplayDevice->InitialSettings.dmPelsHeight =
pData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight;
pData->CurrentDisplayDevice->InitialSettings.dmBitsPerPel =
pData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel;
+ pData->CurrentDisplayDevice->InitialSettings.dmDisplayFrequency =
pData->CurrentDisplayDevice->CurrentSettings->dmDisplayFrequency;
}
else
{
@@ -789,6 +791,7 @@ ApplyDisplaySettings(HWND hwndDlg, PSETTINGS_DATA pData)
pData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth =
pData->CurrentDisplayDevice->InitialSettings.dmPelsWidth;
pData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight =
pData->CurrentDisplayDevice->InitialSettings.dmPelsHeight;
pData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel =
pData->CurrentDisplayDevice->InitialSettings.dmBitsPerPel;
+ pData->CurrentDisplayDevice->CurrentSettings->dmDisplayFrequency
= pData->CurrentDisplayDevice->InitialSettings.dmDisplayFrequency;
UpdateDisplay(hwndDlg, pData, TRUE);
break;