mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
- Use HEAP_ZERO_MEMORY instead of memset().
- Do not crash if no adapter found. svn path=/trunk/; revision=38083
This commit is contained in:
parent
966a02f90b
commit
e415cd9e65
2 changed files with 3 additions and 3 deletions
|
@ -162,7 +162,7 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
|
||||||
InitPropSheetPage(&psh, PropPages[i].idDlg, PropPages[i].DlgProc, PropPages[i].Callback);
|
InitPropSheetPage(&psh, PropPages[i].idDlg, PropPages[i].DlgProc, PropPages[i].Callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NOTE: Don;t call SHAddFromPropSheetExtArray here because this applet only allows
|
/* NOTE: Don't call SHAddFromPropSheetExtArray here because this applet only allows
|
||||||
replacing the background page but not extending the applet by more pages */
|
replacing the background page but not extending the applet by more pages */
|
||||||
|
|
||||||
ret = (LONG)(PropertySheet(&psh) != -1);
|
ret = (LONG)(PropertySheet(&psh) != -1);
|
||||||
|
|
|
@ -151,8 +151,7 @@ AddDisplayDevice(IN PGLOBAL_DATA pGlobalData, IN const DISPLAY_DEVICE *DisplayDe
|
||||||
DWORD ResolutionsCount = 1;
|
DWORD ResolutionsCount = 1;
|
||||||
DWORD i;
|
DWORD i;
|
||||||
|
|
||||||
newEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(DISPLAY_DEVICE_ENTRY));
|
newEntry = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DISPLAY_DEVICE_ENTRY));
|
||||||
memset(newEntry, 0, sizeof(DISPLAY_DEVICE_ENTRY));
|
|
||||||
if (!newEntry) goto ByeBye;
|
if (!newEntry) goto ByeBye;
|
||||||
|
|
||||||
newEntry->Settings = GetPossibleSettings(DisplayDevice->DeviceName, &newEntry->SettingsCount, &newEntry->CurrentSettings);
|
newEntry->Settings = GetPossibleSettings(DisplayDevice->DeviceName, &newEntry->SettingsCount, &newEntry->CurrentSettings);
|
||||||
|
@ -311,6 +310,7 @@ OnInitDialog(IN HWND hwndDlg)
|
||||||
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION), FALSE);
|
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION), FALSE);
|
||||||
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION_TEXT), FALSE);
|
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION_TEXT), FALSE);
|
||||||
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_ADVANCED), FALSE);
|
EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_ADVANCED), FALSE);
|
||||||
|
ShowWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_SPECTRUM), SW_HIDE);
|
||||||
}
|
}
|
||||||
else if (Result == 1)
|
else if (Result == 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue