summaryrefslogtreecommitdiffhomepage
path: root/not/Settings.lua
diff options
context:
space:
mode:
Diffstat (limited to 'not/Settings.lua')
-rw-r--r--not/Settings.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/not/Settings.lua b/not/Settings.lua
index f2919ea..358aa79 100644
--- a/not/Settings.lua
+++ b/not/Settings.lua
@@ -48,9 +48,21 @@ local function controllerLoad ()
end
local function displayLoad ()
- local width, height = 320, 180
- love.window.setFullscreen(false)
- love.window.setMode(width*2, height*2)
+ local width, height, flags = love.window.getMode()
+ if Settings.current.display == "fullscreen" then
+ if not flags.fullscreen then
+ love.window.setFullscreen(true, "desktop")
+ end
+ else
+ local scale = tonumber(Settings.current.display) or 1
+ local expectedWidth, expectedHeight = 320 * scale, 180 * scale
+ if flags.fullscreen then
+ love.window.setFullscreen(false)
+ end
+ if width ~= expectedWidth or height ~= expectedHeight then
+ love.window.setMode(expectedWidth, expectedHeight)
+ end
+ end
end
function Settings.load ()