From 60ef11b3cb857c23453d42e51184e3735b8f7edd Mon Sep 17 00:00:00 2001
From: Eric Wasylishen <[EMAIL REDACTED]>
Date: Fri, 3 Jun 2022 00:21:36 -0600
Subject: [PATCH] Fix Watcom compile errors
---
src/video/windows/SDL_windowsevents.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 4130f97068e..f6f42f36402 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -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);
}