mirror of
https://github.com/love2d/love.git
synced 2026-08-18 19:54:22 +02:00
Fixed love.window.setFullscreen to update the graphics viewport immediately instead of waiting for the next event polling
This commit is contained in:
@@ -358,6 +358,12 @@ bool Window::setFullscreen(bool fullscreen, Window::FullscreenType fstype)
|
|||||||
{
|
{
|
||||||
SDL_GL_MakeCurrent(window, context);
|
SDL_GL_MakeCurrent(window, context);
|
||||||
updateAttributes(newattribs);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,6 @@ function love.init()
|
|||||||
-- will NOT make it load, see below.
|
-- will NOT make it load, see below.
|
||||||
local c = {
|
local c = {
|
||||||
title = "Untitled",
|
title = "Untitled",
|
||||||
author = "Unnamed",
|
|
||||||
version = love._version,
|
version = love._version,
|
||||||
window = {
|
window = {
|
||||||
width = 800,
|
width = 800,
|
||||||
|
|||||||
@@ -504,8 +504,6 @@ const unsigned char boot_lua[] =
|
|||||||
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x20, 0x3d, 0x20, 0x7b, 0x0a,
|
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,
|
0x09, 0x09, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65,
|
||||||
0x64, 0x22, 0x2c, 0x0a,
|
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,
|
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,
|
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x0a,
|
||||||
0x09, 0x09, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x7b, 0x0a,
|
0x09, 0x09, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x7b, 0x0a,
|
||||||
|
|||||||
Reference in New Issue
Block a user