Two PS3 controllers connected via USB identified as one
I'm currently trying to get 2 PS3 controllers (that are connected via USB) to work on my Ubuntu 12.04 machine. For most games this works out-of-the-box but some games such as Shutter identify the two controllers as being only one. I found out that in the "Shatter-case" the "Bus-Vendor-Product-Version" information that is provided by e.g. cat /proc/bus/input/devices is used to identify the gamepad (which is identical for the both controllers):
I: Bus=0003 Vendor=054c Product=0268 Version=0111
N: Name="Sony PLAYSTATION(R)3 Controller"There is a config file for Shatter (~/.sidhe/Shatter/data/profiles/default_plr_profile.xml) that stores the information like this:
<singleplayer_controller_guid>gamepad_030000004c0500006802000011010000</singleplayer_controller_guid>Do you have any ideas how I could work around this (maybe changing the "Product"-id or something like that for one controller)?
1 Answer
That sounds like a bug in SDL2. GUIDS are generated like this:
And are used primarily for configuring the controller. However the GUID is only identifying the controller type not the actual controller, so two controllers of the same type generate the same GUID, which is not what GUIDs should do.
As for workaround, xboxdrv has support for PS3 controllers when connected via USB. In case you prefer Blutooth xboxdrv can also emulate a virtual controller on top of a regular one and allows you to fiddle with product, vendor, etc. on the virtual one, see examples/evdev.xboxdrv.
Made a bug report:
1