Skip to content

Commit

Permalink
Linux: Use the index when generating GUIDs to avoid conflicts between…
Browse files Browse the repository at this point in the history
… identical joysticks
  • Loading branch information
zvova7890 committed Jul 10, 2024
1 parent 6e51b1a commit 51f1d59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/jstick.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void js_guid_create(_js_device *jdev) {
js_guid_unset(&jdev->guid);

(*(word + 0)) = jdev->usb.bustype - 500;
(*(word + 1)) = 0 - 100;
(*(word + 1)) = 0 - 100 + jdev->index;
if (jdev->usb.vendor_id && jdev->usb.product_id) {
(*(word + 2)) = jdev->usb.vendor_id;
(*(word + 3)) = jdev->usb.vendor_id - 200;
Expand Down

0 comments on commit 51f1d59

Please sign in to comment.