Browse Source

win32: Fix high-DPI debug logging

Frank Praznik 1 year ago
parent
commit
8f79e0b7f8
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/video/windows/SDL_windowswindow.c

+ 4 - 4
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;