mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Added love.joystick.loadGamepadMappings (resolves issue #842), and Joystick:saveGamepadMapping.
The latter returns a mapping string, and the former loads a newline-separated list of mapping strings.
This commit is contained in:
@@ -486,6 +486,10 @@ int luax_getfunction(lua_State *L, const char *mod, const char *fn)
|
||||
|
||||
int luax_convobj(lua_State *L, int idx, const char *mod, const char *fn)
|
||||
{
|
||||
// Convert to absolute index if necessary.
|
||||
if (idx < 0 && idx > LUA_REGISTRYINDEX)
|
||||
idx += lua_gettop(L) + 1;
|
||||
|
||||
// Convert string to a file.
|
||||
luax_getfunction(L, mod, fn);
|
||||
lua_pushvalue(L, idx); // The initial argument.
|
||||
|
||||
Reference in New Issue
Block a user