more whitespace tidy-ups in SDL_os2messagebox.c

This commit is contained in:
Ozkan Sezer 2021-11-12 20:47:02 +03:00
parent c2dd50a9a0
commit 3dc7813ae4
1 changed files with 13 additions and 9 deletions

View File

@ -66,9 +66,9 @@ static VOID _wmInitDlg(HWND hwnd, MSGBOXDLGDATA *pDlgData)
hEnum = WinBeginEnumWindows(hwnd);
while ((hWndNext = WinGetNextWindow(hEnum)) != NULLHANDLE) {
if (WinQueryClassName(hWndNext, sizeof(acBuf), acBuf) == 0)
if (WinQueryClassName(hWndNext, sizeof(acBuf), acBuf) == 0) {
continue;
}
if (SDL_strcmp(acBuf, "#3") == 0) { /* Class name of button. */
if (cButtons < sizeof(aButtons) / sizeof(struct _BUTTON)) {
aButtons[cButtons].hwnd = hWndNext;
@ -233,15 +233,19 @@ static HWND _makeDlg(const SDL_MessageBoxData *messageboxdata)
cbTitle + /* First item data - frame title + ZERO. */
cbText + /* Second item data - ststic text + ZERO.*/
3; /* Third item data - system icon Id. */
/* Button items datas - text for buttons. */
for (ulIdx = 0; ulIdx < cSDLBtnData; ulIdx++) {
pszBtnText = (PSZ)pSDLBtnData[ulIdx].text;
cbTemplate += (pszBtnText == NULL)? 1 : (SDL_strlen(pszBtnText) + 1);
}
/* Presentation parameter space. */
if (pSDLColors != NULL)
cbTemplate += 26 /* PP for frame. */ + 26 /* PP for static text. */ +
if (pSDLColors != NULL) {
cbTemplate += 26 /* PP for frame. */ +
26 /* PP for static text. */ +
(48 * cSDLBtnData); /* PP for buttons. */
}
/* Allocate memory for the dialog template. */
pTemplate = (PDLGTEMPLATE) SDL_malloc(cbTemplate);