Joystick indices

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
hryx
Party member
Posts: 110
Joined: Mon Mar 29, 2010 2:28 am
Location: SF<CA<USA

Joystick indices

Post 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.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: Joystick indices

Post by TechnoCat »

hryx wrote:Also, are there any plans to change this behavior in the future?
yes
User avatar
hryx
Party member
Posts: 110
Joined: Mon Mar 29, 2010 2:28 am
Location: SF<CA<USA

Re: Joystick indices

Post by hryx »

Thanks, TechnoCat. I searched the forum but forgot to search the bug tracker. :crazy:
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Joystick indices

Post 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.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: Joystick indices

Post by bmelts »

For the record, this will be fixed in 0.8.0.
User avatar
Ensayia
Party member
Posts: 399
Joined: Sat Jun 12, 2010 7:57 pm

Re: Joystick indices

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], dusoft, Semrush [Bot] and 5 guests