mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +02:00
Fixed love.joystick.loadGamepadMappings to work properly if a FileData object is passed to it.
This commit is contained in:
@@ -178,13 +178,17 @@ int w_getGamepadMapping(lua_State *L)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int w_loadGamepadMappings(lua_State *L)
|
int w_loadGamepadMappings(lua_State *L)
|
||||||
|
{
|
||||||
|
bool isfile = true;
|
||||||
|
std::string mappings;
|
||||||
|
|
||||||
|
if (lua_isstring(L, 1))
|
||||||
{
|
{
|
||||||
lua_pushvalue(L, 1);
|
lua_pushvalue(L, 1);
|
||||||
luax_convobj(L, -1, "filesystem", "isFile");
|
luax_convobj(L, -1, "filesystem", "isFile");
|
||||||
bool isfile = luax_toboolean(L, -1);
|
isfile = luax_toboolean(L, -1);
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
|
}
|
||||||
std::string mappings;
|
|
||||||
|
|
||||||
if (isfile)
|
if (isfile)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user