1
0
Fork 0
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:
fgenesis 2021-01-12 11:06:09 +01:00
parent 86cd7950ca
commit a1f92433d8
5 changed files with 27 additions and 26 deletions

View file

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