diff options
| author | jussi | 2022-02-22 02:49:15 +0200 |
|---|---|---|
| committer | jussi | 2022-02-22 02:49:15 +0200 |
| commit | 8800de59fa704cfe60ac980db079b44042639684 (patch) | |
| tree | aaa2b54327b78a564bc05829a1c66c6e4f3b53de /src/lua_core.c | |
| parent | 612ede6da40550fc0b14c1370f616fc6e83df550 (diff) | |
| download | reilua-enhanced-8800de59fa704cfe60ac980db079b44042639684.tar.gz reilua-enhanced-8800de59fa704cfe60ac980db079b44042639684.tar.bz2 reilua-enhanced-8800de59fa704cfe60ac980db079b44042639684.zip | |
Web build.
Diffstat (limited to 'src/lua_core.c')
| -rw-r--r-- | src/lua_core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lua_core.c b/src/lua_core.c index 1ee21de..54be454 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -213,12 +213,16 @@ bool luaCallMain() { char path[ STRING_LEN ] = { '\0' }; +/* If web, set path to resources folder. */ +#ifdef EMSCRIPTEN + sprintf( path, "resources/main.lua" ); +#else sprintf( path, "%smain.lua", state->exePath ); - /* Alternatively look for main. Could be precompiled binary file. */ if ( !FileExists( path ) ) { sprintf( path, "%smain", state->exePath ); } +#endif luaL_dofile( L, path ); |
