question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicated/conflicting GUIDs for the DragonRise/PC TWIN SHOCK controllers

See original GitHub issue

Turns out that many generic Chinese controllers based on the same PC TWIN SHOCK board from DragonRise Inc. share the same USB vendor (0x0079) and product (0x0006) identifiers, but they also use slightly different button layouts, causing conflicts because the SDL2 gamepad GUID cannot distinguish between them.

My NGS Phantom mainly conflicts with #86 in Linux, and the “G-Shark GS-GP702” in Windows. Funnily enough in macOS looks like the GUID is slightly different, for some reason.

These are the correct mappings for Linux, macOS and Windows:

03000000790000000600000010010000,NGS Phantom---LNX,a:b2,b:b3,x:b0,y:b1,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Linux,
03000000790000000600000007010000,NGS Phantom---MAC,a:b2,b:b3,x:b0,y:b1,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Mac OS X,
03000000790000000600000000000000,NGS Phantom---WIN,a:b2,b:b3,x:b0,y:b1,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Windows,

I ship a game with these community mappings and I’m having trouble playing with my own controller because everything is subtly broken.

PS: Maybe Ryan C. Gordon can add some additional optional bits to tell them apart. Maybe by optionally matching by VID/PID/Version/Revision/Firmware instead of only VID/PID.

imagen

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:26 (17 by maintainers)

github_iconTop GitHub Comments

4reactions
clebercasalicommented, Mar 12, 2019

https://bugzilla.libsdl.org/show_bug.cgi?id=4545 Well, let’s see what happens.

1reaction
sloukencommented, Aug 23, 2022

We’re collecting more information on the upstream bug https://github.com/libsdl-org/SDL/issues/3197, can people please post a description of their controller and the output of this script:

#!/bin/bash
DIR=/sys/bus/usb/devices/$(ls -R /sys/bus/usb/devices/* | grep js$1 | cut -d$'\n' -f2 | cut -d: -f1 | awk -F/ '{print $NF}')
IMANUFACTURER=$(cat $DIR/manufacturer)
IPRODUCT=$(cat $DIR/product)
ISERIAL=$(cat $DIR/serial)
IVERSION=$(cat $DIR/version | xargs)
SIGNATURE="$IMANUFACTURER:$IPRODUCT:$ISERIAL:$IVERSION"
echo $SIGNATURE
Read more comments on GitHub >

github_iconTop Results From Across the Web

Joystick is crazy in games - Steam for Linux
-Microntek USB Joystick (DragonRise Inc. PC TWIN SHOCK Gamepad) ... You can try to calibrate your gamepad or use the steam controller ......
Read more >
Dual Dragonrise - Mappings stepping on eachother?
fix: duplicate pads no longer share an ID, allowing multiple identical controllers to be used for multiplayer. Salut, J'ai le même soucis avec ......
Read more >
Release Notes
44.0: Changes: - MacOS, Game Controller Framework: Added support for setting light color on Dual Shock 4 and Dual Sense controllers. - Checks...
Read more >
Tonight We Riot by Means Interactive - Itch.io
In a dystopia where wealthy capitalists control elections, media, and the lives of working people, ... Dragonrise Inc. PC Twin Shock Gamepad.
Read more >
Blog – The God Learners
So… there was only one RuneQuest book out this year (the other two Glorantha-related books are great, don't get me wrong, but they' ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found