As I tough, jscal fails. I had a hacked version of it that didn't fail on this bug(just commented out some returns). I will try to find it(for now I have only binary version). Unfortunately now I can't search for it, maybe tomorrow.
Originally Posted by Kano
Under linux you can actually remap joystick axes and buttons.
To do this you need output of jscal -q /dev/input/js0
like this (mine as example):
jscal -u 7,0,1,2,3,5,16,17,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0
To swap axes you need to swap appropriate numbers and run command.
first number is number of axes
then come actual axes
ninth number is number of buttons(after axes)
and after that buttons itself.
In this example I swap 4th and 5th axis.
For some strange reason for SDL you must set SDL_JOYSTICK_DEVICE to point to joystick device file or remap won't affect app.
jscal -u 7,0,1,2,5,3,16,17,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0