[freespace2] joystick/mouse turning speed patch

Geller Sandor wildy at petra.hos.u-szeged.hu
Sun Apr 24 07:39:52 EDT 2005


On Sat, 23 Apr 2005, Geller Sandor wrote:

> Attached is a patch which brings joystick and mouse turning speed par with
> the keyboard. I'm not sure whether this patch is correct or not... (If I
> understood the code correctly, then the joystick delta is between 0 and
> 32767 - 0 means leftern position, 32768 is the center and 65535 is the
> rightern position, so the max delta from the center is 32767 - but
> the code normalizes this with dividing by 65536, which gives only the half
> of the correct value.)

My assumptions were completely WRONG. I added some debug statements to the
joystick code, and it turned out, that my joystick reports bogus ranges.
The code assumes that the joystick report range is 0-65535, but my
Logitech gives the following results

axis 0 between 10000 and 63000
axis 1 between 5600 and 57000
axis 2 between 14500 and 57000
axis 3 between 9800 and 50700

I don't know what is wrong (the joystick hw, the kernel USB or input
layer, the adi driver, ...).

Sorry for the noise...

  Geller Sandor <wildy at petra.hos.u-szeged.hu>



More information about the freespace2 mailing list