We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5137 - Identical joysticks are not handled properly
Summary: Identical joysticks are not handled properly
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.13
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-15 00:25 UTC by Jasem Mutlaq
Modified: 2020-05-15 00:25 UTC (History)
0 users

See Also:


Attachments
Patch (2.15 KB, patch)
2020-05-15 00:25 UTC, Jasem Mutlaq
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jasem Mutlaq 2020-05-15 00:25:33 UTC
Created attachment 4340 [details]
Patch

This issue came up as I was trying to play X4 Foundations on Linux. I have Dual ThrustMaster 16000M Joysticks. Only one of them appear in X4 Foundations. This patch renames any subsequent discovered joystick with an index. i.e. If the name is "Joystick", then the second discovered joystick name is "Joystick 2", then "Joystick 3" and so forth.

Furthermore, it changes the guid to make them all unique. Both these changes were necessary to make the 2nd joystick appear in X4. They now both operate perfectly within the game.