Fix Watcom compile errors

main
Eric Wasylishen 2022-06-03 00:21:36 -06:00 committed by Sam Lantinga
parent d3b970d4d5
commit 60ef11b3cb
1 changed files with 7 additions and 2 deletions

View File

@ -1476,7 +1476,9 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
/* Add the window frame size that would be used at nextDPI */
{
RECT rect = { 0, 0, query_client_w_win, query_client_h_win };
RECT rect = {0};
rect.right = query_client_w_win;
rect.bottom = query_client_h_win;
if (!(data->window->flags & SDL_WINDOW_BORDERLESS)) {
data->videodata->AdjustWindowRectExForDpi(&rect, style, menu, 0, nextDPI);
@ -1529,10 +1531,13 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SDL_Log("WM_DPICHANGED: using suggestedRect");
#endif
} else {
RECT rect = { 0, 0, data->window->w, data->window->h };
const DWORD style = GetWindowLong(hwnd, GWL_STYLE);
const BOOL menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
RECT rect = {0};
rect.right = data->window->w;
rect.bottom = data->window->h;
if (!(data->window->flags & SDL_WINDOW_BORDERLESS)) {
AdjustWindowRectEx(&rect, style, menu, 0);
}