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);