Use GetApplicationDirectory instead of GetWorkingDirectory for basePath if no path argument given.

This commit is contained in:
jussi
2024-05-20 15:45:31 +03:00
parent e84be85254
commit 9edaf7a47b
9 changed files with 25 additions and 23 deletions

View File

@@ -1160,10 +1160,10 @@ bool luaCallMain() {
snprintf( path, STRING_LEN, "main" );
}
#else
snprintf( path, STRING_LEN, "%smain.lua", state->exePath );
snprintf( path, STRING_LEN, "%smain.lua", state->basePath );
/* Alternatively look for main. Could be precompiled binary file. */
if ( !FileExists( path ) ) {
snprintf( path, STRING_LEN, "%smain", state->exePath );
snprintf( path, STRING_LEN, "%smain", state->basePath );
}
#endif
luaL_dofile( L, path );