mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Joystick:getIndex now returns nil instead of -1 if the joystick isn't connected
This commit is contained in:
@@ -51,7 +51,7 @@ int w_getIndex(lua_State *L)
|
|||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
lua_pushinteger(L, index + 1);
|
lua_pushinteger(L, index + 1);
|
||||||
else
|
else
|
||||||
lua_pushinteger(L, -1);
|
lua_pushnil(L);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user