Display and control your Android device
Disable controls on --no-mirror
Romain Vimont92483fe11b6f
diff --git a/app/src/cli.c b/app/src/cli.cindex 1ba7fe1f..066f46fc 100644--- a/app/src/cli.c+++ b/app/src/cli.c@@ -2041,6 +2041,15 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],}#endif+#ifdef HAVE_USB+ if (!opts->mirror && opts->control && !opts->otg) {+#else+ if (!opts->mirror && opts->control) {+#endif+ LOGD("Mirroring is disabled, force --no-control");+ opts->control = false;+ }+return true;}diff --git a/app/src/scrcpy.c b/app/src/scrcpy.cindex 2c7fbf30..03b643f6 100644--- a/app/src/scrcpy.c+++ b/app/src/scrcpy.c@@ -426,7 +426,8 @@ scrcpy(struct scrcpy_options *options) {struct sc_file_pusher *fp = NULL;- if (options->mirror && options->control) {+ assert(!options->control || options->mirror); // control implies mirror+ if (options->control) {if (!sc_file_pusher_init(&s->file_pusher, serial,options->push_target)) {goto end;