inconsistent indexing: joystickpressed/Joystick.isDown
Posted: Sat Dec 28, 2013 3:28 am
I haz found bug
Migrating my code from 0.8.0 to 0.9.0 it seems that love.joystickpressed is called for indexes starting at 1 while Joystick.isDown expects and index starting from 0. Minimal code:

Migrating my code from 0.8.0 to 0.9.0 it seems that love.joystickpressed is called for indexes starting at 1 while Joystick.isDown expects and index starting from 0. Minimal code:
Code: Select all
function love.joystickpressed(j, b)
print(j:isDown(b)) -- always false, ie. wtfroflmao?
end
Code: Select all
function love.joystickpressed(j, b)
print(j:isDown(b-1)) -- always true
end