1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

prevent jerkiness when creating window in fullscreen mode

This commit is contained in:
fgenesis 2021-01-12 14:18:33 +01:00
parent 067472d61b
commit 37fa087c2e

View file

@ -105,7 +105,10 @@ void Window::_open(unsigned w, unsigned h, bool full, unsigned bpp, bool vsync,
exit_error("Failed to create GL context"); exit_error("Failed to create GL context");
SDL_GL_MakeCurrent(WIN, GLCTX); SDL_GL_MakeCurrent(WIN, GLCTX);
_adjust(w, h, full, bpp, vsync, display, hz); setvsync(vsync);
if(!full) // When we're in fullscreen mode everything is fine by now
_adjust(w, h, full, bpp, vsync, display, hz);
} }
void Window::_adjust(unsigned w, unsigned h, bool full, unsigned bpp, bool vsync, unsigned display, unsigned hz) void Window::_adjust(unsigned w, unsigned h, bool full, unsigned bpp, bool vsync, unsigned display, unsigned hz)