aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/embed.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-12-19 17:36:48 +0800
committerchai <chaifix@163.com>2018-12-19 17:36:48 +0800
commitcad5193dfb6c79874f7d0c8c39bcfac8489ba9b3 (patch)
tree74345a48f33d8d6b7bd8e553f09c5566ee59a519 /src/lua/embed/embed.h
parent4957f1c346509b30940371f093139067287b6867 (diff)
*shader
Diffstat (limited to 'src/lua/embed/embed.h')
-rw-r--r--src/lua/embed/embed.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lua/embed/embed.h b/src/lua/embed/embed.h
index b5e1334..1928dd5 100644
--- a/src/lua/embed/embed.h
+++ b/src/lua/embed/embed.h
@@ -24,18 +24,21 @@ namespace JinEngine
{ "graphics.lua", graphics_lua },
{ "keyboard.lua", keyboard_lua },
{ "mouse.lua", mouse_lua },
- { "boot.lua", boot_lua },
{ 0, 0 }
};
+ static const jin_Embed bootscript = { "boot.lua", boot_lua };
+
static void run(lua_State* L)
{
for (int i = 0; modules[i].file; ++i)
{
const char* file = modules[i].file, *source = modules[i].source;
if (luax_loadbuffer(L, source, strlen(source), file) == 0)
- lua_call(L, 0, 0);
+ luax_call(L, 0, 0);
}
+ if (luax_loadbuffer(L, bootscript.source, strlen(bootscript.source), bootscript.file) == 0)
+ luax_call(L, 0, 0);
}
} // namespace Embed