UI: Update width and height for fullscreen
This commit is contained in:
parent
5430dd0cd0
commit
90bd08ffd1
|
@ -246,6 +246,9 @@ void Win32Window::ToggleFullscreen(bool fullscreen) {
|
||||||
AdjustWindowRect(&rc, GetWindowLong(hwnd_, GWL_STYLE), false);
|
AdjustWindowRect(&rc, GetWindowLong(hwnd_, GWL_STYLE), false);
|
||||||
MoveWindow(hwnd_, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
|
MoveWindow(hwnd_, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
|
||||||
TRUE);
|
TRUE);
|
||||||
|
|
||||||
|
width_ = rc.right - rc.left;
|
||||||
|
height_ = rc.bottom - rc.top;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Reinstate borders, resize to 1280x720
|
// Reinstate borders, resize to 1280x720
|
||||||
|
@ -256,6 +259,10 @@ void Win32Window::ToggleFullscreen(bool fullscreen) {
|
||||||
if (main_menu) {
|
if (main_menu) {
|
||||||
::SetMenu(hwnd_, main_menu->handle());
|
::SetMenu(hwnd_, main_menu->handle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto& rc = windowed_pos_.rcNormalPosition;
|
||||||
|
width_ = rc.right - rc.left;
|
||||||
|
height_ = rc.bottom - rc.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
fullscreen_ = fullscreen;
|
fullscreen_ = fullscreen;
|
||||||
|
|
Loading…
Reference in New Issue