mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 10:50:15 -10:00
A DualShock 4, a DualSense or a Wii Remote comes out of the kernel as several nodes beside the pad's: motion sensors, a touchpad, raw reports. At each connect the driver searched every input or hidraw device on the system for each of them in turn - up to four scans - and kept those whose HID parent was the pad's. It now lists the pad's HID device's own nodes once, and a table (linux_pad_members.h) gives each its role: the node tagged as an accelerometer for the sensors, else the untagged ones in order, as for a Wii Remote; the one tagged as a touchpad for the touchpad, never tried as the sensors; the hidraw node for a DualShock 3's pressures. The pad's own node takes none. linux_pad_members_test holds the choice to that.