mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-05 00:35:23 +00:00
Add option to disable clipboard autosync
By default, scrcpy automatically synchronizes the computer clipboard to the device clipboard before injecting Ctrl+v, and the device clipboard to the computer clipboard whenever it changes. This new option --no-clipboard-autosync disables this automatic synchronization. Fixes #2228 <https://github.com/Genymobile/scrcpy/issues/2228> PR #2817 <https://github.com/Genymobile/scrcpy/pull/2817>
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#define OPT_V4L2_BUFFER 1029
|
||||
#define OPT_TUNNEL_HOST 1030
|
||||
#define OPT_TUNNEL_PORT 1031
|
||||
#define OPT_NO_CLIPBOARD_AUTOSYNC 1032
|
||||
|
||||
struct sc_option {
|
||||
char shortopt;
|
||||
@@ -208,6 +209,15 @@ static const struct sc_option options[] = {
|
||||
"is preserved.\n"
|
||||
"Default is 0 (unlimited).",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_NO_CLIPBOARD_AUTOSYNC,
|
||||
.longopt = "no-clipboard-autosync",
|
||||
.text = "By default, scrcpy automatically synchronizes the computer "
|
||||
"clipboard to the device clipboard before injecting Ctrl+v, "
|
||||
"and the device clipboard to the computer clipboard whenever "
|
||||
"it changes.\n"
|
||||
"This option disables this automatic synchronization."
|
||||
},
|
||||
{
|
||||
.shortopt = 'n',
|
||||
.longopt = "no-control",
|
||||
@@ -1364,6 +1374,9 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case OPT_NO_CLIPBOARD_AUTOSYNC:
|
||||
opts->clipboard_autosync = false;
|
||||
break;
|
||||
#ifdef HAVE_V4L2
|
||||
case OPT_V4L2_SINK:
|
||||
opts->v4l2_device = optarg;
|
||||
|
Reference in New Issue
Block a user