Joystick:getIndex now returns nil instead of -1 if the joystick isn't connected

This commit is contained in:
Alex Szpakowski
2013-08-26 13:27:19 -03:00
parent 63815d3b52
commit db1e8e762a
@@ -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;
}