50 lines
1.3 KiB
Lua
50 lines
1.3 KiB
Lua
local runtime = require("runtime/detect")
|
|
-- sync lovr/love positional cli arguments
|
|
if arg[0] == nil and arg[1] ~= nil then arg[0] = arg[1] end
|
|
|
|
local runtime = require("runtime/detect")
|
|
|
|
-- setup path
|
|
print("!!!!!!!")
|
|
package.path = package.path ..
|
|
'runtime/lovr/?.lua;' ..
|
|
'runtime/lovr/?/init.lua;' ..
|
|
'lib/?.lua;' ..
|
|
'?.lua'
|
|
--arg[0] .. 'runtime/lovr/?.lua;' ..
|
|
--arg[0] .. 'runtime/lovr/?/init.lua;' ..
|
|
--arg[0] .. 'lib/?.lua;' ..
|
|
lovr.filesystem.setRequirePath(
|
|
lovr.filesystem.getRequirePath() .. ";" ..
|
|
'runtime/lovr/?.lua;' ..
|
|
'runtime/lovr/?/init.lua;' ..
|
|
'lib/?.lua;' ..
|
|
'?.lua'
|
|
)
|
|
|
|
print(lovr.filesystem.getRequirePath())
|
|
|
|
local util = require("util")
|
|
local launch = require "runtime/lovr/launch"
|
|
|
|
local function isVR()
|
|
return launch.mode == "vr" or util.match(arg,"--desktop") == false
|
|
end
|
|
|
|
local function isResizable()
|
|
return launch.mode == "desktop"
|
|
end
|
|
|
|
function lovr.conf(t)
|
|
if isVR() then
|
|
t.headset.supersample = 2
|
|
else
|
|
t.modules.headset = nil
|
|
end
|
|
|
|
t.identity = "xurfer"
|
|
t.window.title = "X U R F Ξ R"
|
|
t.window.width = 1280
|
|
t.window.height = 720
|
|
t.window.resizable = isResizable()
|
|
end
|