From 8f79e0b7f8fb0620a9fd91f23ac6c2e71df110e8 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Mon, 18 Dec 2023 11:31:37 -0500 Subject: [PATCH] win32: Fix high-DPI debug logging --- src/video/windows/SDL_windowswindow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c index ef93a9a55c..7bb9a11679 100644 --- a/src/video/windows/SDL_windowswindow.c +++ b/src/video/windows/SDL_windowswindow.c @@ -224,10 +224,10 @@ static int WIN_AdjustWindowRectWithStyle(SDL_Window *window, DWORD style, BOOL m #ifdef HIGHDPI_DEBUG SDL_Log("WIN_AdjustWindowRectWithStyle: in: %d, %d, %dx%d, returning: %d, %d, %dx%d, used dpi %d for frame calculation", - (use_current ? window->requested.x : window->windowed.x), - (use_current ? window->requested.y : window->windowed.y), - (use_current ? window->requested.w : window->windowed.w), - (use_current ? window->requested.h : window->windowed.h), + (rect_type == SDL_WINDOWRECT_FLOATING ? window->floating.x : rect_type == SDL_WINDOWRECT_WINDOWED ? window->windowed.x : window->x), + (rect_type == SDL_WINDOWRECT_FLOATING ? window->floating.y : rect_type == SDL_WINDOWRECT_WINDOWED ? window->windowed.y : window->y), + (rect_type == SDL_WINDOWRECT_FLOATING ? window->floating.w : rect_type == SDL_WINDOWRECT_WINDOWED ? window->windowed.w : window->w), + (rect_type == SDL_WINDOWRECT_FLOATING ? window->floating.h : rect_type == SDL_WINDOWRECT_WINDOWED ? window->windowed.h : window->h), *x, *y, *width, *height, frame_dpi); #endif return 0;