Leaving Fullscreen doesn't restore original window size
Posted: Mon Aug 20, 2018 1:23 pm
If i'm exiting fullscreen mode the original window size isnt being restored, as stated in the wiki:
That's my code:
I'm running LOVE 11.1 (Mysterious Mysteries) on Linux.
https://love2d.org/wiki/love.window.setFullscreenIf fullscreen mode is entered and the window size doesn't match one of the monitor's display modes (in normal fullscreen mode) or the window size doesn't match the desktop size (in 'desktop' fullscreen mode), the window will be resized appropriately. The window will revert back to its original size again when fullscreen mode is exited using this function.
That's my code:
Code: Select all
function love.keypressed(key)
if key == "f" then
local fullscreen = love.window.getFullscreen()
if fullscreen then
love.window.setFullscreen(false)
else
love.window.setFullscreen(true, "desktop")
end
end
end