Re: [AD] Linux joystick driver button limitation

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
> 
> Tom Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > I have a USB SideWinder GamePad Pro and allegro
> > has always ignored the 9th button, so i took
> > a look at ljoy.c and changed the 'if(num_buttons > 8)...'
> > to 'if(num_buttons > 9)...', and also the line
> > in joy_poll so now I have a working 9th button
> > and want to know if this change would affect
> > other joysticks? (i.e.: gameport joysticks)
> 
> Can you check the attached patch?  It uses constants from allegro.h
> instead of making up its own.  I'm not sure about it as I haven't
> used the joystick API for a long time.
> 

It works fine. In fact its better than fine :) The driver for my
joypad reports that it has 10 buttons but allegro only sees 9. :)
(which is correct.)

-- 
Tom Fjellstrom
tfjellstrom@xxxxxxxxxx
http://strangesoft.net/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/