mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- Remember maximized window state
This commit is contained in:
parent
afe1199b69
commit
c8e713b067
1 changed files with 6 additions and 0 deletions
|
@ -56,6 +56,7 @@ EXTERN_CVAR (Bool, vid_forceddraw)
|
||||||
|
|
||||||
CVAR(Int, win_x, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Int, win_x, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
CVAR(Int, win_y, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Int, win_y, -1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
CVAR(Bool, win_maximized, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
extern HWND Window;
|
extern HWND Window;
|
||||||
|
|
||||||
|
@ -382,6 +383,8 @@ void I_SaveWindowedPos ()
|
||||||
win_x = wrect.left;
|
win_x = wrect.left;
|
||||||
win_y = wrect.top;
|
win_y = wrect.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win_maximized = IsZoomed(Window) == TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,6 +412,9 @@ void I_RestoreWindowedPos ()
|
||||||
KeepWindowOnScreen (winx, winy, winw, winh, scrwidth, scrheight);
|
KeepWindowOnScreen (winx, winy, winw, winh, scrwidth, scrheight);
|
||||||
}
|
}
|
||||||
MoveWindow (Window, winx, winy, winw, winh, TRUE);
|
MoveWindow (Window, winx, winy, winw, winh, TRUE);
|
||||||
|
|
||||||
|
if (win_maximized && !Args->CheckParm("-0"))
|
||||||
|
ShowWindow(Window, SW_MAXIMIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||||
|
|
Loading…
Reference in a new issue