mirror of https://github.com/bjornbytes/lovr.git
Fix pcall and only use nogame conf for nogame;
This commit is contained in:
parent
2aed5135b7
commit
afd11cf0b9
|
@ -98,10 +98,10 @@ function lovr.boot()
|
|||
|
||||
local ok, failure = true, nil
|
||||
if source ~= bundle and not lovr.filesystem.mount(source) then
|
||||
failure = ('Failed to load project at %q\nMake sure the path or archive is valid.'):format(source)
|
||||
ok, failure = false, ('Failed to load project at %q\nMake sure the path or archive is valid.'):format(source)
|
||||
elseif not lovr.filesystem.isFile(main) then
|
||||
local location = source == '.' and '' or (' in %q'):format(source:match('[^/\\]+[/\\]?$'))
|
||||
failure = ('No %s file found%s.\nThe project may be packaged incorrectly.'):format(main, location)
|
||||
ok, failure = false, ('No %s file found%s.\nThe project may be packaged incorrectly.'):format(main, location)
|
||||
else
|
||||
lovr.filesystem.setSource(source)
|
||||
if lovr.filesystem.isFile('conf.lua') then ok, failure = pcall(require, 'conf') end
|
||||
|
@ -140,7 +140,7 @@ function lovr.boot()
|
|||
lovr.headset.start()
|
||||
end
|
||||
|
||||
if failure then
|
||||
if not ok and failure then
|
||||
error(failure)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if lovr.filesystem.getRealDirectory('main.lua') ~= lovr.filesystem.getExecutablePath() then
|
||||
return -- Only run this conf file if bundled with the executable
|
||||
end
|
||||
|
||||
function lovr.conf(t)
|
||||
t.headset.supersample = true
|
||||
t.modules.audio = false
|
||||
|
|
Loading…
Reference in New Issue