Add option to select USB or TCP/IP devices

If several devices are connected (as listed by `adb devices`), it was
necessary to provide the explicit serial via -s/--serial.

If only one device is connected via USB (respectively, via TCP/IP), it
might be convenient to select it automatically. For this purpose, two
new options are introduced:
 - -d/--select-usb: select the single device connected over USB
 - -e/--select-tcpip: select the single device connected over TCP/IP

PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005>
This commit is contained in:
Romain Vimont
2022-02-06 18:40:18 +01:00
parent 146f65d7b2
commit 582161607e
9 changed files with 79 additions and 3 deletions

View File

@@ -60,4 +60,6 @@ const struct scrcpy_options scrcpy_options_default = {
.downsize_on_error = true,
.tcpip = false,
.tcpip_dst = NULL,
.select_tcpip = false,
.select_usb = false,
};