Page 1 of 1

Joystick indices

Posted: Tue Mar 22, 2011 12:54 am
by hryx
Wheee, I'm making a game finally. Actually, I've fallen madly in LOVE with Lua. I wanna marry it right now.

I'm sure it has been asked before, but why does love.joystick index game pads starting at 0 instead of 1? Is the index just taken directly from SDL? This is information that should be in the Wiki.

Also, are there any plans to change this behavior in the future? Not that I'm so anxious, but it would be good to prepare for something that might make my code break with the next LOVE release.

Thankz! You guys are making my spring sleepless and wonderful.

Re: Joystick indices

Posted: Tue Mar 22, 2011 12:59 am
by TechnoCat
hryx wrote:Also, are there any plans to change this behavior in the future?
yes

Re: Joystick indices

Posted: Tue Mar 22, 2011 2:29 am
by hryx
Thanks, TechnoCat. I searched the forum but forgot to search the bug tracker. :crazy:

Re: Joystick indices

Posted: Thu Mar 24, 2011 2:55 am
by Ensayia
This issue enraged me for a few hours one day, why anyone thought it was a good idea to break Lua convention confuses me.

I made a note about this in the love.joystick.open() wiki page.

Re: Joystick indices

Posted: Thu Mar 24, 2011 4:11 am
by bmelts
For the record, this will be fixed in 0.8.0.

Re: Joystick indices

Posted: Thu Mar 24, 2011 5:55 am
by Ensayia
anjo wrote:For the record, this will be fixed in 0.8.0.
Excellent. I still made a notation in the wiki so newbies don't tear their hair out.