Love ignores resolution settings in Conf and SetMode
Posted: Fri Apr 03, 2015 8:53 am
I'm having some issues setting the resolution in Love (Windows 8.1) and it's really bugging me. I've tried setting the resolution to 1920x1080 in both Conf.lua and by using SetMode, and no matter what I do it always seems to use 1536x864 as the resolution.
1920x1080 is my native resolution. And I only noticed the issue because Fraps has been repeatedly recording at that resolution instead of 1920x1080, so I know the window is actually using that resolution.
Here's a code sample to show you what I am doing:
I set the resolution as 1920x1080 in Conf.lua as well, which you can see in the attachment. The resolution turns out the same whether I manually set the mode or not. It runs at the same resolution whether I run it in ZeroBrane Studio, through Love using a .love file, or when I compile it into an .exe. No matter what I do it just refuses to use the resolution I specified.
Someone please help me with this. If I can't get Love to run at the proper resolution I'm going to have to stop using it, and I don't want to do that.
EDIT: If I switch the fullscreen mode to "normal" it sets the resolution to 1600x900. It seems to have a mind of its own.
1920x1080 is my native resolution. And I only noticed the issue because Fraps has been repeatedly recording at that resolution instead of 1920x1080, so I know the window is actually using that resolution.
Here's a code sample to show you what I am doing:
Code: Select all
function love.load()
window_height_conf = love.window.getHeight()
window_width_conf = love.window.getWidth()
love.window.setMode(1920, 1080, SetMode())
window_height_setmode = love.window.getHeight()
window_width_setmode = love.window.getWidth()
font_24 = love.graphics.newFont(24)
love.graphics.setFont(font_24)
end
function love.draw(dt)
local text = "Conf: (" .. window_width_conf .. ", " .. window_height_conf .. ")"
love.graphics.printf(text, window_width_setmode - ((love.graphics.getFont():getWidth(text) + 10)), 10, 1000, "left", 0, 1, 1)
text = "SetMode: (" .. window_width_setmode .. ", " .. window_height_setmode .. ")"
love.graphics.printf(text, window_width_setmode - ((love.graphics.getFont():getWidth(text) + 10)), 15 + love.graphics.getFont():getHeight(text), 1000, "left", 0, 1, 1)
end
function SetMode()
local r = {}
r.fullscreen = true
r.fullscreentype = "desktop"
r.vsync = true
r.fsaa = 2
r.resizable = false
r.borderless = false
r.centered = true
r.display = 1
r.minwidth = 1
r.minheight = 1
r.highdpi = false
r.srgb = false
r.x = nil
r.y = nil
return r
end
Someone please help me with this. If I can't get Love to run at the proper resolution I'm going to have to stop using it, and I don't want to do that.
EDIT: If I switch the fullscreen mode to "normal" it sets the resolution to 1600x900. It seems to have a mind of its own.