mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-19 19:15:08 +00:00
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 <https://github.com/Genymobile/scrcpy/issues/5803> PR #5804 <https://github.com/Genymobile/scrcpy/pull/5804> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
c27d116a66
commit
986328ff9e
2 changed files with 5 additions and 5 deletions
|
@ -389,7 +389,7 @@ Disable video playback on the computer.
|
|||
|
||||
.TP
|
||||
.B \-\-no\-window
|
||||
Disable scrcpy window. Implies --no-video-playback and --no-control.
|
||||
Disable scrcpy window. Implies --no-video-playback.
|
||||
|
||||
.TP
|
||||
.BI "\-\-orientation " value
|
||||
|
|
|
@ -689,8 +689,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,
|
||||
|
@ -2761,9 +2760,10 @@ 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;
|
||||
// Controls are still possible, allowing for options like
|
||||
// --turn-screen-off
|
||||
}
|
||||
|
||||
if (!opts->video) {
|
||||
|
|
Loading…
Add table
Reference in a new issue