mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
The full executable path, rather than argv[0], is now used when determining whether the executable is fused (resolves issue #1043.)
This commit is contained in:
@@ -301,6 +301,12 @@ int w_getRealDirectory(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_getExecutablePath(lua_State *L)
|
||||
{
|
||||
luax_pushstring(L, instance()->getExecutablePath());
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_isDirectory(lua_State *L)
|
||||
{
|
||||
const char *arg = luaL_checkstring(L, 1);
|
||||
@@ -699,6 +705,7 @@ static const luaL_Reg functions[] =
|
||||
{ "getSaveDirectory", w_getSaveDirectory },
|
||||
{ "getSourceBaseDirectory", w_getSourceBaseDirectory },
|
||||
{ "getRealDirectory", w_getRealDirectory },
|
||||
{ "getExecutablePath", w_getExecutablePath },
|
||||
{ "isDirectory", w_isDirectory },
|
||||
{ "isFile", w_isFile },
|
||||
{ "createDirectory", w_createDirectory },
|
||||
|
||||
Reference in New Issue
Block a user