1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00

Moved library path modifications to main.lua, made all paths relative

The library path can now be easlily modified.

Instead of always launching /3ds/ctruLua/main.lua, ctruLua will now launch the main.lua in the current directory (the ctruLua.3dsx directory when launched with HBL).

On citra, this will be the root of the sdmc directory.
This commit is contained in:
Reuh 2015-10-25 11:08:27 +01:00
parent 81f8edb25d
commit 0efdc23576
6 changed files with 49 additions and 21 deletions

View file

@ -4,8 +4,6 @@
#include <lauxlib.h>
#include <lualib.h>
#define BOOT_FILE "sdmc:/3ds/ctruLua/main.lua"
void load_ctr_lib(lua_State *L);
void unload_ctr_lib(lua_State *L);
@ -47,7 +45,7 @@ int main() {
load_ctr_lib(L);
// Do the actual thing
if (luaL_dofile(L, BOOT_FILE)) error(luaL_checkstring(L, -1));
if (luaL_dofile(L, "main.lua")) error(luaL_checkstring(L, -1));
// Unload libs
unload_ctr_lib(L);