From 606c49b8e59a984b80fd95a1cfcae7ca9b900283 Mon Sep 17 00:00:00 2001 From: Sam Listopad II Date: Thu, 30 Jan 2025 14:02:12 -0600 Subject: [PATCH] Only disable control for no-window if we also don't do any other video operations --- app/src/cli.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/cli.c b/app/src/cli.c index ed1970d4..38b56a3a 100644 --- a/app/src/cli.c +++ b/app/src/cli.c @@ -687,8 +687,7 @@ static const struct sc_option options[] = { { .longopt_id = OPT_NO_WINDOW, .longopt = "no-window", - .text = "Disable scrcpy window. Implies --no-video-playback and " - "--no-control.", + .text = "Disable scrcpy window. Implies --no-video-playback", }, { .longopt_id = OPT_ORIENTATION, @@ -2759,9 +2758,12 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[], #endif if (!opts->window) { - // Without window, there cannot be any video playback or control + // Without window, there cannot be any video playback opts->video_playback = false; - opts->control = false; + // Without any other video output control doesn't make sense + if(!opts->record_filename && !v4l2){ + opts->control = false; + } } if (!opts->video) {