Added use-ssh option.

This commit is contained in:
Vladimir Chebotarev 2020-09-06 15:26:58 +03:00
parent d02789ce21
commit 8517390476
2 changed files with 7 additions and 0 deletions

View file

@ -651,6 +651,7 @@ guess_record_format(const char *filename) {
#define OPT_DISABLE_SCREENSAVER 1020
#define OPT_SHORTCUT_MOD 1021
#define OPT_NO_KEY_REPEAT 1022
#define OPT_USE_SSH 1024
bool
scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
@ -697,6 +698,7 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
{"window-height", required_argument, NULL, OPT_WINDOW_HEIGHT},
{"window-borderless", no_argument, NULL,
OPT_WINDOW_BORDERLESS},
{"use-ssh", no_argument, NULL, OPT_USE_SSH},
{NULL, 0, NULL, 0 },
};
@ -856,6 +858,9 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) {
return false;
}
break;
case OPT_USE_SSH:
opts->use_ssh = true;
break;
default:
// getopt prints the error message on stderr
return false;

View file

@ -79,6 +79,7 @@ struct scrcpy_options {
bool force_adb_forward;
bool disable_screensaver;
bool forward_key_repeat;
bool use_ssh;
};
#define SCRCPY_OPTIONS_DEFAULT { \
@ -123,6 +124,7 @@ struct scrcpy_options {
.force_adb_forward = false, \
.disable_screensaver = false, \
.forward_key_repeat = true, \
.use_ssh = false, \
}
bool