https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6caf7124b5a4cc093bf60…
commit 6caf7124b5a4cc093bf60b050c593294ce2f8e2a
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Tue Jan 11 18:05:04 2022 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Tue Jan 11 23:47:55 2022 +0100
[DESK] Factorize changing device description to OnDisplayDeviceChanged()
---
dll/cpl/desk/settings.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dll/cpl/desk/settings.c b/dll/cpl/desk/settings.c
index 300ef616853..eaf9bfb76b3 100644
--- a/dll/cpl/desk/settings.c
+++ b/dll/cpl/desk/settings.c
@@ -300,6 +300,9 @@ OnDisplayDeviceChanged(IN HWND hwndDlg, IN PSETTINGS_DATA pData, IN
PDISPLAY_DEV
}
}
+ /* Fill device description */
+ SendDlgItemMessage(hwndDlg, IDC_SETTINGS_DEVICE, WM_SETTEXT, 0,
(LPARAM)pDeviceEntry->DeviceDescription);
+
/* Fill resolutions slider */
SendDlgItemMessage(hwndDlg, IDC_SETTINGS_RESOLUTION, TBM_CLEARTICS, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_SETTINGS_RESOLUTION, TBM_SETRANGE, TRUE, MAKELONG(0,
pDeviceEntry->ResolutionsCount - 1));
@@ -354,7 +357,6 @@ SettingsOnInitDialog(IN HWND hwndDlg)
MONSL_MONINFO monitors;
/* Single video adapter */
- SendDlgItemMessage(hwndDlg, IDC_SETTINGS_DEVICE, WM_SETTEXT, 0,
(LPARAM)pData->DisplayDeviceList->DeviceDescription);
OnDisplayDeviceChanged(hwndDlg, pData, pData->DisplayDeviceList);
monitors.Position.x = monitors.Position.y = 0;
@@ -372,7 +374,6 @@ SettingsOnInitDialog(IN HWND hwndDlg)
PMONSL_MONINFO pMonitors;
DWORD i;
- SendDlgItemMessage(hwndDlg, IDC_SETTINGS_DEVICE, WM_SETTEXT, 0,
(LPARAM)pData->DisplayDeviceList->DeviceDescription);
OnDisplayDeviceChanged(hwndDlg, pData, pData->DisplayDeviceList);
pMonitors = (PMONSL_MONINFO)HeapAlloc(GetProcessHeap(), 0, sizeof(MONSL_MONINFO)
* Result);