Re: [hatari-devel] joystick subsystem patch for configurable axis mapping

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


On 10/12/2011 10:29, Matthias Arndt wrote:
Hello together,

as I'm still prevented to commit changes myself, I post the files here
for review.

The attached patch includes a mapping table into the joystick subsystem
to map the joystick  axis to be used to the given SDL joystick name.

If the joystick name does not match any table entry, the code reverts to
the default mapping of using joystick axis 0 for X input and axis 1 for
Y input.

Atm the table is hardcoded but the longterm goal is to have the table
a) stored inthe Hatari config file
b) have GUI support to configure the data inbetween

Atm it only remaps the axis for my secondary USB gamepad but the table
can be tweaked to match other pads.

I tidied the mapping to the given SDL joystick name and not the SDL ID
as the SDL joystick ID can change if joysticks and pads are plugged in
in a different order.

Please review, if necessary tweak variable naming and commit.


Hello

could you provide these changes as some diff files instead please ? It's easier to see what is modified.


Nicolas



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