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;
}
-1
View File
@@ -278,7 +278,6 @@ function love.init()
-- will NOT make it load, see below.
local c = {
title = "Untitled",
author = "Unnamed",
version = love._version,
window = {
width = 800,
-2
View File
@@ -504,8 +504,6 @@ const unsigned char boot_lua[] =
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x20, 0x3d, 0x20, 0x7b, 0x0a,
0x09, 0x09, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x64, 0x22, 0x2c, 0x0a,
0x09, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x6e, 0x6e, 0x61, 0x6d, 0x65,
0x64, 0x22, 0x2c, 0x0a,
0x09, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x5f,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x0a,
0x09, 0x09, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x7b, 0x0a,