Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP - ControllerInterface. Combine evdev devices with the same "uniq" name. #8356
Unfortunately newer Linux drivers for DS4 (Playstation 4) controllers split the device into three separate event nodes.
On my system I get:
Apparently this is due to some evdev policy: "A device must not mix regular directional axes and accelerometer axes on the same event node."
Our input system does allow use of multiple devices via "All Devices" or so-called "absolute path" control expressions, but this is less than desirable especially when making use of multiple DS4s.
This PR combines evdev devices that return the same non-null unique ID (via
Mapping of raw acceleration/gyroscope inputs in PR #8352 is less horrible this way.
I'm not entirely happy with this implementation. It gets pretty ugly, especially the parts that keep the button/axis names in the same deterministic order, but there doesn't seem to be a clean way to do it as evdev enumerates devices in a seemingly random order.