mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 12:05:00 +00:00
Force adb forward if tunnel host/port is provided
Tunnel host and port are only meaningful in "adb forward" mode. They indicate where the client must connect to communicate with the server. In "adb reverse" mode, the client _listens_, it does not _connect_. Refs #2807 <https://github.com/Genymobile/scrcpy/pull/2807>
This commit is contained in:
parent
46f7cd31b9
commit
64400c8740
1 changed files with 6 additions and 0 deletions
|
@ -1405,6 +1405,12 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
|||
}
|
||||
#endif
|
||||
|
||||
if ((opts->tunnel_host || opts->tunnel_port) && !opts->force_adb_forward) {
|
||||
LOGI("Tunnel host/port is set, "
|
||||
"--force-adb-forward automatically enabled.");
|
||||
opts->force_adb_forward = true;
|
||||
}
|
||||
|
||||
int index = optind;
|
||||
if (index < argc) {
|
||||
LOGE("Unexpected additional argument: %s", argv[index]);
|
||||
|
|
Loading…
Add table
Reference in a new issue