mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 14:34:34 +00:00
fixes to window size management, fullscreen transition, etc
This commit is contained in:
parent
86cd7950ca
commit
a1f92433d8
5 changed files with 27 additions and 26 deletions
|
@ -44,7 +44,7 @@ void Window::onQuit()
|
|||
|
||||
void Window::setFullscreen(bool on)
|
||||
{
|
||||
if(_full != on)
|
||||
if(!!_full != on)
|
||||
open(-1, -1, on, -1, -1, -1, -1);
|
||||
}
|
||||
|
||||
|
@ -52,15 +52,17 @@ void Window::open(int w, int h, int full, int bpp, int vsync, int display, int h
|
|||
{
|
||||
_fixOpenParams(w, h, full, bpp, vsync, display, hz);
|
||||
|
||||
if(isOpen())
|
||||
_adjust(w, h, !!full, bpp, !!vsync, display, hz);
|
||||
else
|
||||
_open(w, h, !!full, bpp, !!vsync, display, hz);
|
||||
|
||||
_w = w;
|
||||
_h = h;
|
||||
_display = display;
|
||||
_bpp = bpp;
|
||||
_full = !!full;
|
||||
_vsync = !!vsync;
|
||||
|
||||
if(isOpen())
|
||||
_adjust(w, h, !!full, bpp, !!vsync, display, hz);
|
||||
else
|
||||
_open(w, h, !!full, bpp, !!vsync, display, hz);
|
||||
}
|
||||
|
||||
void Window::_fixOpenParams(int& w, int& h, int& full, int& bpp, int& vsync, int& display, int& hz)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue