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

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


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



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