diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/embed/boot.lua.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lua/embed/boot.lua.h b/src/lua/embed/boot.lua.h index 055a653..35606af 100644 --- a/src/lua/embed/boot.lua.h +++ b/src/lua/embed/boot.lua.h @@ -59,7 +59,7 @@ function jin.core.run() jin.graphics.clear() call(jin.core.onDraw) jin.graphics.present() - -- sleep 1 ms + -- Sleep 1 ms jin.time.sleep(0.001) end end @@ -138,19 +138,19 @@ jin.nogame = { ------------------------------------------------------------------------- local function onError(msg) - print("Error:\n" .. msg) - function jin.core.onEvent(e) - if e.type == "Quit" then - jin.core.stop() - end - end - function jin.core.onDraw() - jin.graphics.unsetFont() - jin.graphics.print("Error:\n" .. msg .. "\n" .. debug.traceback(), 5, 5) - end jin.graphics.setClearColor(100, 100, 100, 255) - jin.core.onLoad = nil - jin.core.run() + jin.graphics.clear() + jin.graphics.unsetFont() + jin.graphics.print("Error:\n" .. msg .. "\n" .. debug.traceback(), 5, 5) + jin.graphics.present() + while jin.core.running() do + for _, e in pairs(jin.event.poll()) do + if e.type == "Quit" then + jin.core.stop() + end + end + jin.time.sleep(0.001) + end jin.core.quit() end |