Add AOA gamepad support

Similar to AOA keyboard and mouse, but for gamepads.

Can be enabled with --gamepad=aoa.
This commit is contained in:
Romain Vimont
2024-09-06 23:08:08 +02:00
parent 385b31fb06
commit d14cc19c91
10 changed files with 213 additions and 11 deletions

View File

@@ -26,6 +26,7 @@ _scrcpy() {
-e --select-tcpip
-f --fullscreen
--force-adb-forward
--gamepad=
-h --help
-K
--keyboard=
@@ -127,6 +128,10 @@ _scrcpy() {
COMPREPLY=($(compgen -W 'disabled sdk uhid aoa' -- "$cur"))
return
;;
--gamepad)
COMPREPLY=($(compgen -W 'disabled aoa' -- "$cur"))
return
;;
--orientation|--display-orientation)
COMPREPLY=($(compgen -W '0 90 180 270 flip0 flip90 flip180 flip270' -- "$cur"))
return

View File

@@ -33,6 +33,7 @@ arguments=(
{-e,--select-tcpip}'[Use TCP/IP device]'
{-f,--fullscreen}'[Start in fullscreen]'
'--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]'
'--gamepad=[Set the gamepad input mode]:mode:(disabled aoa)'
{-h,--help}'[Print the help]'
'-K[Use UHID keyboard (same as --keyboard=uhid)]'
'--keyboard=[Set the keyboard input mode]:mode:(disabled sdk uhid aoa)'