Fixed love.window.setFullscreen to update the graphics viewport immediately instead of waiting for the next event polling

This commit is contained in:
Alex Szpakowski
2013-10-30 14:26:34 -03:00
parent fad9d25093
commit 101c6ae90a
3 changed files with 6 additions and 3 deletions
+6
View File
@@ -358,6 +358,12 @@ bool Window::setFullscreen(bool fullscreen, Window::FullscreenType fstype)
{
SDL_GL_MakeCurrent(window, context);
updateAttributes(newattribs);
// Update the viewport size now instead of waiting for event polling.
graphics::Graphics *gfx = (graphics::Graphics *) Module::findInstance("love.graphics.");
if (gfx)
gfx->setViewportSize(curMode.width, curMode.height);
return true;
}