mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +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)
|
||||
lua_pushinteger(L, index + 1);
|
||||
else
|
||||
lua_pushinteger(L, -1);
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user