Replaced Joystick:saveGamepadMapping with love.joystick.saveGamepadMappings, which saves all gamepad mappings from both recently-used joysticks and recently-modified mappings. saveGamepadMappings returns a string of newline-separated mappings and takes an optional filename argument which writes it to a file.

This commit is contained in:
Alex Szpakowski
2014-06-05 00:25:34 -03:00
parent 10e0d4b900
commit ddb9997ead
6 changed files with 60 additions and 45 deletions
+1 -2
View File
@@ -119,7 +119,7 @@ int w_Joystick_getHat(lua_State *L)
Joystick::Hat h = j->getHat(hatindex);
const char *direction = "";
love::joystick::Joystick::getConstant(h, direction);
Joystick::getConstant(h, direction);
lua_pushstring(L, direction);
return 1;
@@ -249,7 +249,6 @@ static const luaL_Reg functions[] =
// From wrap_JoystickModule.
{ "getConnectedIndex", w_getIndex },
{ "getGamepadMapping", w_getGamepadMapping },
{ "saveGamepadMapping", w_saveGamepadMapping },
{ 0, 0 },
};