From ff1d5fe966e5d80caf7d9964904040803b00a5be Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 25 Dec 2020 23:34:37 +0100 Subject: [PATCH] Window size is now set back to the remembered one when returning from Full Screen when the window is resizable and set to remember the size, fixes #1142. --- src/win/win.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/win/win.c b/src/win/win.c index 74f8d16a4..1f62f2974 100644 --- a/src/win/win.c +++ b/src/win/win.c @@ -810,12 +810,17 @@ plat_setfullscreen(int on) plat_resize(scrnsz_x, scrnsz_y); if (vid_resize) { /* scale the screen base on DPI */ - if (dpi_scale) { - temp_x = MulDiv(unscaled_size_x, dpi, 96); - temp_y = MulDiv(unscaled_size_y, dpi, 96); + if (window_remember) { + temp_x = window_w; + temp_y = window_h; } else { - temp_x = unscaled_size_x; - temp_y = unscaled_size_y; + if (dpi_scale) { + temp_x = MulDiv(unscaled_size_x, dpi, 96); + temp_y = MulDiv(unscaled_size_y, dpi, 96); + } else { + temp_x = unscaled_size_x; + temp_y = unscaled_size_y; + } } /* Main Window. */ ResizeWindowByClientArea(hwndMain, temp_x, temp_y + sbar_height);