Merge pull request #289 from alloverse/noheadset

Allow lovr.headset.init to fail
This commit is contained in:
Bjorn 2020-10-01 14:49:40 -06:00 committed by GitHub
commit fc48df874c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -159,7 +159,11 @@ function lovr.boot()
end
if lovr.headset and lovr.graphics and conf.window then
lovr.headset.init()
local ok, result = pcall(lovr.headset.init)
if not ok then
print(string.format('Warning: Could not load module %q: %s', 'headset', result))
lovr.headset = nil
end
end
lovr.handlers = setmetatable({}, { __index = lovr })