Author Topic: Weird Joystick wrap-around problem under Linux [solved]  (Read 1955 times)

0 Members and 1 Guest are viewing this topic.

Weird Joystick wrap-around problem under Linux [solved]
Hi,
my Saitek evo Force USB-Joystick shows some really weird behaviour.

For the record, I am running Freespace 2 Open v3.6.9 OpenGL under Linux (Ubuntu Feisty). I followed the great install guide in the wiki, used the binary installer and copied the game data from the cd.

The joystick has four axes (Axes 0 to 3: X, Y, Throttle, RZ), a hat which is recognized by jscal as axes 4 and 5, and 12 buttons. All buttons and axes are recognized in the game; the Throttle and RZ-axis work fine.

The problem is with the X and Y axes; they go from -32767 to 32767 near the center, then wrap around, so instead of having one range from -32767 to 32767 on an axis, one axis is divided into about 5.5 such ranges. As you can imagine, this makes flying impossible. After calibrating the joystick with jscal, the joystick behaves correctly in jstest, but jscal seems to have no effect on fs2_open - after calibration, the joystick still wraps around in-game.

My Gamepad (Logitech WingMan RumblePad) works without any problems whatsoever - both analog sticks, the digital pad and all 9 buttons work (but when flying with those tiny sticks, I don't hit anything  :rolleyes: )

I tried setting the variable SDL_LINUX_JOYSTICK to "4 1 0", but that didn't have any effect (didn't expect one, as my hat is correctly recognized).

When I get back from school today, I will test fs2_open on my windows partition and see wether the problem occurs under Win XP, but I'd love to be able to play under Linux, so I don't have to reboot (windows is only kept for windows-only games).

EDIT: Can anyone recommend other games for Linux to test the joystick with (maybe one using SDL, one handling joystick input differently)?

If you're still reading, thanks for your attention! Any help with this problem would be greatly appreciated!
« Last Edit: October 27, 2007, 02:12:00 am by der_bAUer »

  
Re: Weird Joystick wrap-around problem under Linux [solved]
Now that I compiled the source myself (stable branch v3.6.9), it works! I don't know why, maybe it got linked to other libraries or whatever (C++ and especially its preprocessor are a mystery to me).

Big thanks to Volition and the fs2_open community for giving me a game that has BOTH great gameplay AND decent graphics!