forked from DarkEnergyProcessor/livesim2_async
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.lua
64 lines (52 loc) · 2.47 KB
/
conf.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Configuration file
-- Part of Live Simulator: 2
-- See copyright notice in main.lua
-- luacheck: globals DEPLS_VERSION
-- luacheck: globals DEPLS_VERSION_NUMBER
-- luacheck: globals DEPLS_VERSION_CODENAME
local love = require("love")
if love._os == "Android" and jit then jit.on() end
if love._os == "Windows" then require("io_open_wide") end
local errhand = love.errorhandler or love.errhand
function love.errorhandler(msg)
print((debug.traceback("Error: " .. tostring(msg), 2):gsub("\n[^\n]+$", "")))
end
local Util = require("util")
love._version = love._version or love.getVersion()
-- Set identity and give game directory a priority
love.filesystem.setIdentity("DEPLS", true)
-- Fix MRT in LOVE 11.0-11.2
if Util.compareLOVEVersion(11, 0) >= 0 and Util.compareLOVEVersion(11, 3) < 0 then
love.filesystem.load("fixmrt.lua")()
end
-- Set in main.lua later
DEPLS_VERSION = false
DEPLS_VERSION_NUMBER = false
DEPLS_VERSION_CODENAME = false
if love._exe then
setmetatable(_G, {
__index = function(_, var) error("unknown variable "..var, 2) end,
__newindex = function(_, var) error("new variable not allowed "..var, 2) end,
__metatable = function(_) error("global variable protection", 2) end,
})
end
if love.filesystem.isFused() and Util.fileExists("OUTSIDE_ASSET") then
assert(love.filesystem.mount(love.filesystem.getSourceBaseDirectory(), ""), "failed to load game directory")
end
function love.conf(t)
t.version = Util.compareLOVEVersion(0, 10, 0) >= 0 and love._version or "0.10.0"
t.identity = "DEPLS"
t.appendidentity = true -- Search files in source directory before save directory (boolean)
t.console = false -- Attach a console (boolean, Windows only)
t.accelerometerjoystick = false -- Enable accelerometer on iOS and Android as a Joystick (boolean)
t.externalstorage = true -- True to use external storage on Android (boolean)
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)
t.highdpi = true -- Enable high-dpi mode for the window on a Retina display (boolean)
t.window = false -- Defer window creation
t.modules.audio = false -- Delay audio module
t.modules.joystick = false -- Enable the joystick module (boolean)
t.modules.physics = false -- Enable the physics module (boolean)
end
function love.createhandlers()
love.handlers = {}
end