Skip to content

Commit 986328f

Browse files
samliirom1v
authored andcommitted
Allow controls with --no-window
Without a window, mouse and keyboard events may not be received, but the control channel is still necessary for other features: * --turn-screen-off * --stay-awake * --show-touches * --power-off-on-close * --start-app Fixes #5803 <#5803> PR #5804 <#5804> Signed-off-by: Romain Vimont <[email protected]>
1 parent c27d116 commit 986328f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/scrcpy.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ Disable video playback on the computer.
389389

390390
.TP
391391
.B \-\-no\-window
392-
Disable scrcpy window. Implies --no-video-playback and --no-control.
392+
Disable scrcpy window. Implies --no-video-playback.
393393

394394
.TP
395395
.BI "\-\-orientation " value

app/src/cli.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,7 @@ static const struct sc_option options[] = {
689689
{
690690
.longopt_id = OPT_NO_WINDOW,
691691
.longopt = "no-window",
692-
.text = "Disable scrcpy window. Implies --no-video-playback and "
693-
"--no-control.",
692+
.text = "Disable scrcpy window. Implies --no-video-playback.",
694693
},
695694
{
696695
.longopt_id = OPT_ORIENTATION,
@@ -2761,9 +2760,10 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
27612760
#endif
27622761

27632762
if (!opts->window) {
2764-
// Without window, there cannot be any video playback or control
2763+
// Without window, there cannot be any video playback
27652764
opts->video_playback = false;
2766-
opts->control = false;
2765+
// Controls are still possible, allowing for options like
2766+
// --turn-screen-off
27672767
}
27682768

27692769
if (!opts->video) {

0 commit comments

Comments
 (0)