Re: [hatari-devel] impact of recent Joystick axis mapping patch

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Dienstag, den 02.04.2013, 18:02 +0200 schrieb Nicolas Pomarède: 
> Le 02/04/2013 17:54, Matthias Arndt a écrit :
> > Hello,
> >
> > I noticed there was a patch in the joystick subsystem made by Nicolas.. I
> > don't have a problem with it but as I authored the basic axis mapping
> > stuff, I'd like to know what the exact problem and fixes are?
> >
> > The code worked for my setup, I'm just curious.
> >
> > Regards,
> > Matthias
> 
> hello
> 
> you did
> 
> sdlJoystickMapping[i] = &(AxisMappingTable[i]);
> 
> instead of copying entry 'j' in mapping 'i' (the last one found in the 
> inner loop)
> 
> sdlJoystickMapping[i] = &(AxisMappingTable[i]);
> 
> So whatever version of USB joystick would be recognized, joystick 0 will 
> always have mapping 0, joystick 1 always mapping 1, joystick 2 always 
> mapping 2 (which doesn't exist in that case, as AxisMappingTable has 
> only 2 entries), and so on.
> 
> In my case, my usb joystick in port 1 was not correctly detected : it 
> used 'USB Gamepad' mapping instead of '*DEFAULT*', but my USB joystick's 
> name has nothing to do with "USB Gamepad", so it should have the default 
> axes mapping.
> 
> It worked for you because your joystick is really a "USB Gamepad" :)
> 
> Nicolas
> 

Thanks for the explanation and obvious bug report!
That makes it clear as I normally have my default gamepad with an USB
adaptor connected as joystick 0. The connection is on the backside of
the PC and I normally do not unplug this. Seems I should have done so
during testing :(

Anyway this is an interim solution anyway. The main idea still is to
allow the mapping to be configured externally from the configuration
file and/or GUI instead of this hard table.

I simply had no time to work it in, esp not in a GUI fashion.

Otoh, I don't remember seeing any bug reports on this yet. Maybe they
eluded my view.


Thanks again!
Matthias

-- 
Matthias Arndt <marndt@xxxxxxxxxxxxxx>
PGP-Key: http://www.final-memory.org/files/marndt.asc
Jabber: simonsunnyboy@xxxxxxxxxxxxxxxx




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