aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/boot.lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/embed/boot.lua.h')
-rw-r--r--src/lua/embed/boot.lua.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lua/embed/boot.lua.h b/src/lua/embed/boot.lua.h
index 2369b0f..0884188 100644
--- a/src/lua/embed/boot.lua.h
+++ b/src/lua/embed/boot.lua.h
@@ -19,6 +19,7 @@ jin.config.title = jin.config.title or ("jin v" .. jin.version)
jin.config.resizable = jin.config.resizable or false
jin.config.fullscreen = jin.config.fullscreen or false
jin.config.fps = jin.config.fps or 60
+jin.config.icon = jin.config.icon or ""
-------------------------------------------------------------------------
-- Default game loop
@@ -62,6 +63,7 @@ end
-- Display error message.
local function onError(msg)
+ jin.graphics.showWindow()
local err = "Error:\n" .. msg .. "\n" .. debug.traceback()
jin.graphics.reset()
jin.graphics.setClearColor(100, 100, 100, 255)
@@ -80,7 +82,7 @@ end
-- No game screen.
local function noGame()
- jin.graphics.reset()
+ jin.graphics.showWindow()
jin.graphics.reset()
jin.graphics.setClearColor(100, 100, 100, 255)
jin.graphics.clear()
@@ -114,6 +116,10 @@ end
jin.audio.init()
jin.graphics.init(jin.config)
+-------------------------------------------------------------------------
+-- Boot game
+-------------------------------------------------------------------------
+
xpcall(boot, onError)
-------------------------------------------------------------------------