mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Use Xbox 360 gamepad USB ids
Use the vendorId and productId of an Xbox 360 controller for better support (the HID gamepad protocol used in scrcpy is similar to that of the Xbox 360 controller). Fixes #5362 <https://github.com/Genymobile/scrcpy/issues/5362> PR #5623 <https://github.com/Genymobile/scrcpy/pull/5623>
This commit is contained in:
parent
e492b175f0
commit
71f54ece2e
1 changed files with 3 additions and 2 deletions
|
|
@ -7,8 +7,9 @@
|
|||
/** Downcast gamepad processor to sc_gamepad_uhid */
|
||||
#define DOWNCAST(GP) container_of(GP, struct sc_gamepad_uhid, gamepad_processor)
|
||||
|
||||
#define SC_GAMEPAD_UHID_VENDOR_ID 0
|
||||
#define SC_GAMEPAD_UHID_PRODUCT_ID 0
|
||||
// Xbox 360
|
||||
#define SC_GAMEPAD_UHID_VENDOR_ID UINT16_C(0x045e)
|
||||
#define SC_GAMEPAD_UHID_PRODUCT_ID UINT16_C(0x028e)
|
||||
|
||||
static void
|
||||
sc_gamepad_uhid_send_input(struct sc_gamepad_uhid *gamepad,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue