Created attachment 224498 [details]
Minimal patch (but see description)
I have a game pad (the current PowerA Xbox One one) that is not supported by the version of xpad.c included with webcamd.
The Linux commit that fixed things for me is this one:
A minimal fix for my concrete gamepad (USB 20d6:2802) is simply adding an XPAD_XBOXONE_VENDOR(0x20d6) line into xpad.c (attached).
Would prefer a full sync with current Linux xpad.c, of course, see https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c - ideally just with a newer Linux kernel base. From looking at a diff of Linux' current xpad.c and the xpad.c from 5.10-rc6, which this port uses, it seems like the only changes were some minor refactoring (probably a kernel API change) and lots of added devices.
Tested with a game that uses the ebiten game library and a patched go-gl/glfw (requires https://github.com/go-gl/glfw/pull/318). Likely gonna work with SDL and RetroArch too, haven't tested though.
Is this patch urgent?
Possibly it is better to update webcamd's Linux sources, instead of managing loose patches :-)
Not urgent as I clearly have my own workaround - I assume my personal patch in the port is rather stable, and just switched from portsnap to git so I can retain the patch for a while.