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.

This commit is contained in:
OBattler
2020-12-25 23:34:37 +01:00
parent 255a0a633a
commit ff1d5fe966

View File

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