Page 1 of 1

Joystick and gamepad support: technical explanation?

PostPosted: 23 Oct 2014, 17:41
by xeno74
Hi,

I need some technical background knowledge about STK and joysticks and gamepads. Linux actually has 2 different input systems for Joysticks. The original 'Joystick' interface and the newer 'evdev' based one. '/dev/input/jsX' maps to the 'Joystick' API interface and /dev/input/eventX maps to the 'evdev' ones (this also includes other input devices such as mice and keyboards). Which system use STK? Does Irrlicht manage the joystick and gamepad support in STK?
I have a problem with joysticks in STK. STK recognize my joystick but it doesn't recognize if I press a button.

Thanks in advance,

Christian

Re: Joystick and gamepad support: technical explanation?

PostPosted: 23 Oct 2014, 17:48
by xeno74
{l Code}: {l Select All Code}
jstest /dev/input/js0
works without any problems.

Re: Joystick and gamepad support: technical explanation?

PostPosted: 23 Oct 2014, 18:14
by xeno74
If I run supertuxkart --gamepad-visualisation, all buttons are responsive.

Re: Joystick and gamepad support: technical explanation?

PostPosted: 24 Oct 2014, 11:32
by hiker
Hi,

yes, irrlicht handles all joysticks for us. You would need to look into that code to find out the details.

xeno74 {l Wrote}:If I run supertuxkart --gamepad-visualisation, all buttons are responsive.

if the buttons are shwon with gamepad visualisation, they should work in game. So you can't assign the buttons to certain functions?

Could you try running with --gamepad-debug. It should print the status of all buttons (that will be a lot of output potentially).

Have you tried to remove your input.xml file, perhaps something is wrong there? Any other strange devices in the device list?

Cheers,
Joerg