mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Fixed Joystick:isDown to accept 1-based instead of 0-based button indices
This commit is contained in:
@@ -135,7 +135,7 @@ int w_Joystick_isDown(lua_State *L)
|
||||
|
||||
std::vector<int> buttons;
|
||||
for (int i = 2; i <= lua_gettop(L); i++)
|
||||
buttons.push_back(luaL_checkint(L, i));
|
||||
buttons.push_back(luaL_checkint(L, i) - 1);
|
||||
|
||||
luax_pushboolean(L, j->isDown(buttons));
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user