Skip to content
Snippets Groups Projects
Commit d6381417 authored by dg's avatar dg
Browse files

When ran for the first time the game will maximze as much as possible instead of using 800x600

git-svn-id: http://svn.net-core.org/repos/t-engine4@2852 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9c7b5fd5
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,6 @@ fs.setWritePath(fs.getHomePath())
-- Loads default config & user config
fs.mount(engine.homepath, "/")
config.loadString[[
window.size = "800x600"
sound.enabled = true
music.volume = 60
aa_text = true
......@@ -65,6 +64,16 @@ for i, file in ipairs(fs.list("/settings/")) do
end
end
-- Default resolution as big as possible
if not config.settings.window or not config.settings.window.size then
local list = core.display.getModesList()
table.sort(list, function(a, b) return a.w > b.w end)
local r = list[1] or {w=800, h=600}
print("[RESOLUTION] no configured resolution, defaulting to biggest possible: ", r.w, r.h)
config.settings.window = config.settings.window or {}
config.settings.window.size = r.w.."x"..r.h
end
-- Load default keys
engine.KeyBind:load("move,hotkeys,inventory,actions,interface,debug")
......
......@@ -22,7 +22,7 @@ newChat{ id="welcome",
I do not think I want to see death so closely for some time now.
Farewell.]],
answers = {
{"For the Empite! Take care.", action=function(npc, player)
{"For the Empire! Take care.", action=function(npc, player)
npc:disappear()
world:gainAchievement("NORGAN_SAVED", player)
end},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment