mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Changed Joystick:getID to be 1-based instead of 0-based
This commit is contained in:
@@ -53,7 +53,7 @@ int w_Joystick_getName(lua_State *L)
|
|||||||
int w_Joystick_getID(lua_State *L)
|
int w_Joystick_getID(lua_State *L)
|
||||||
{
|
{
|
||||||
Joystick *j = luax_checkjoystick(L, 1);
|
Joystick *j = luax_checkjoystick(L, 1);
|
||||||
lua_pushinteger(L, j->getID());
|
lua_pushinteger(L, j->getID() + 1); // IDs are 1-based in Lua.
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user