supertuxkart-sourceforge-migration / stk-migration-test

0 stars 0 forks source link

Steering right fails when accelerometer joystick device is enabled #790

Open supertuxkart-sourceforge-migration opened 10 years ago

supertuxkart-sourceforge-migration commented 10 years ago

Author: shuber2

On my notebook (Thinkpad X220), supertuxkart-0.8.1 failed to steer right when pressing the corresponding cursor key on the keyboard. After debugging the code I realized that PA_STEER_RIGHT actions arrive at the controller classes in high frequency even though no keys are pressed. This obviously caused the car not to steer right. The source for these events was the "ThinkPad HDAPS accelerometer data" joystick device.

This is per se no bug in the logic of supertuxkart, but a very hard to track down misconfiguration. I am not sure how to handle this issue but here are a few proposals:

  1. Do not enable any joystick device per default, but let the user opt-in to enable joystick devices.
  2. Only apply the previous proposal to devices that contain the string "accelerometer" in their name or try to filter out the accelerometer by other means. Actually, there is a legitimate wish to use the accelerometer to steer a car, but the proper device to achieve this is "ThinkPad HDAPS joystick emulation".
  3. Add an entry to your FAQ to point out this possible issue.

Migrated-From: https://sourceforge.net/apps/trac/supertuxkart/ticket/1111

supertuxkart-sourceforge-migration commented 10 years ago

Author: hikerstk Add this name (or at least a substring of it) to the names to be ignored. Ignoring the device in the settings solves the issue. For the record the exact device name after ignoring it is:

 <gamepad name ="ThinkPad HDAPS accelerometer data" enabled="false">