Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solves #8 issue. #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Solves #8 issue. #56

wants to merge 3 commits into from

Conversation

jmbau
Copy link
Collaborator

@jmbau jmbau commented Jul 14, 2024

Features:

  • Supports full mapping for up to 3 joysticks with up to 8 axes, 16 buttons and 2 POV hats per joystick.
  • Supports movement inversion for axes and POV hats.
  • Supports joystick hot plug on joystick test page (not in game).
  • Joysticks connection order now don't matter (each joystick unit is detected by its SDL "Globally Unique ID").
  • Supports "move axis to select" for axes and hats mapping, as it was already possible for buttons.
  • Point Of View control can now be mapped on two analog axes, not only on a hat.
  • Air brakes on/off state now works properly when mapped to a joystick button (was jiggling).
  • Wheel brakes now works as hereunder when mapped to a joystick button:
    • Push button to apply wheel brakes, release button to release wheel brakes (no modification here).
    • Push button and press <'shift'> key then release button before release <'shift'> key to activate parking brake.
    • When in parking brake state, click (push then release) button to release brakes.
  • Wheel brakes works as hereunder when mapped to one or two analog axes:
    • Move axis (brake pedal) to apply braking, release to release braking.
    • When braking power is 100%, press <'shift'> key then release braking before release <'shift'> key to activate parking brake.
    • When in parking brake state, move axis (pedal) to at least 1% then release it to release parking brake.
  • Adds a [Keyboard...] button in controller options menu (see known bugs).

Known bugs:

  • When an old sar.ini configuration file is read, mapping is lost. There is a warning about that, but it is only visible from command line.
  • In poor resolutions (640x480/VGA and 720x400), test page is readable with max 2 joysticks (not 3) and mapping page is really not beautifull but works. From SVGA (800x600) and upper resolutions, all is okay.
  • Wheel brakes <'shift'> key detection don't work very good on joystick test page but works perfectly while in game.
  • New [Keyboard...] button in controller options menu don't work (disabled/grayed-out). The reason of this button is that on my keyboard wheel brakes / parking brakes command is really very difficult to use because of <'period'> (.) and <'greater than'> (>) keys positions are radically different on my AZERTY keyboard than on a QWERTY one. Because wheel brake action works now fine when mapped on a joystick button or analog pedal(s), I didn't work on that yet.
  • If Point Of View control is mapped on two analog axes, it will works fine only if axes values are near to zero (+/-1% dead bandwidth) when axes are at their rest position. It not, POV will drift.

SVGA resolution window captures:
Screenshot_20240714_174726
Screenshot_20240714_175319

@hsanjuan
Copy link
Member

hsanjuan commented Sep 3, 2024

This is pretty awesome but I haven't had time to test with my setup. Will merge once I can test it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants