And fixed the behavior of that.
This commit is contained in:
@@ -1094,8 +1094,7 @@ plat_setfullscreen(int on)
|
||||
else
|
||||
ResizeWindowByClientArea(hwndMain, temp_x, temp_y + sbar_height);
|
||||
|
||||
if (window_remember)
|
||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
||||
}
|
||||
|
||||
/* Render window. */
|
||||
|
@@ -97,7 +97,7 @@ SpecifyDimensionsDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM
|
||||
|
||||
if (lock) {
|
||||
vid_resize = 2;
|
||||
window_remember = 1;
|
||||
window_remember = 0;
|
||||
} else {
|
||||
vid_resize = 1;
|
||||
window_remember = 1;
|
||||
@@ -140,7 +140,7 @@ SpecifyDimensionsDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, LPARAM
|
||||
if (mouse_capture)
|
||||
ClipCursor(&r);
|
||||
|
||||
if (window_remember) {
|
||||
if (window_remember || (vid_resize & 2)) {
|
||||
window_x = r.left;
|
||||
window_y = r.top;
|
||||
if (!(vid_resize & 2)) {
|
||||
|
@@ -697,7 +697,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
window_remember = !window_remember;
|
||||
CheckMenuItem(hmenu, IDM_VID_REMEMBER, window_remember ? MF_CHECKED : MF_UNCHECKED);
|
||||
GetWindowRect(hwnd, &rect);
|
||||
if (window_remember) {
|
||||
if (window_remember || (vid_resize & 2)) {
|
||||
window_x = rect.left;
|
||||
window_y = rect.top;
|
||||
if (!(vid_resize & 2)) {
|
||||
@@ -980,11 +980,13 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
video_force_resize_set(1);
|
||||
}
|
||||
|
||||
if (window_remember) {
|
||||
if (window_remember || (vid_resize & 2)) {
|
||||
window_x = pos->x;
|
||||
window_y = pos->y;
|
||||
window_w = pos->cx;
|
||||
window_h = pos->cy;
|
||||
if (!(vid_resize & 2)) {
|
||||
window_w = pos->cx;
|
||||
window_h = pos->cy;
|
||||
}
|
||||
save_window_pos = 1;
|
||||
config_save();
|
||||
}
|
||||
@@ -1385,8 +1387,7 @@ ui_init(int nCmdShow)
|
||||
else
|
||||
ResizeWindowByClientArea(hwndMain, scrnsz_x, scrnsz_y + sbar_height);
|
||||
|
||||
if (window_remember)
|
||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
||||
SetWindowPos(hwndMain, HWND_TOP, window_x, window_y, 0, 0, SWP_NOSIZE);
|
||||
}
|
||||
|
||||
/* Reset all menus to their defaults. */
|
||||
|
Reference in New Issue
Block a user