Default errhand implementation handles restart event;

This commit is contained in:
bjorn 2020-08-04 12:21:38 -06:00
parent f1b447662d
commit 86fee211f1
1 changed files with 4 additions and 1 deletions

View File

@ -233,7 +233,10 @@ function lovr.errhand(message, traceback)
return function()
lovr.event.pump()
for name, a in lovr.event.poll() do if name == 'quit' then return a or 1 end end
for name, a in lovr.event.poll() do
if name == 'quit' then return a or 1
elseif name == 'restart' then return 'restart', lovr.restart and lovr.restart() end
end
lovr.graphics.origin()
if lovr.headset then
lovr.headset.update(0)