Add UHID gamepad support

Similar to UHID keyboard and mouse, but for gamepads.

Can be enabled with --gamepad=uhid or -G.

It is not enabled by default because not all devices support UHID
(there is a permission error on old Android versions).

PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
This commit is contained in:
Romain Vimont 2024-09-06 23:08:08 +02:00
parent 64a25f6e9d
commit f9d1a333a0
11 changed files with 200 additions and 8 deletions

View file

@ -158,6 +158,7 @@ enum sc_mouse_input_mode {
enum sc_gamepad_input_mode {
SC_GAMEPAD_INPUT_MODE_DISABLED,
SC_GAMEPAD_INPUT_MODE_UHID,
SC_GAMEPAD_INPUT_MODE_AOA,
};