mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -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 },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user