mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-31 22:35:37 +00:00
Add option to not power on on start
By default, on start, the device is powered on. To prevent this behavior, add a new option --no-power-on. Fixes #3148 <https://github.com/Genymobile/scrcpy/issues/3148> PR #3210 <https://github.com/Genymobile/scrcpy/pull/3210>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#define OPT_OTG 1036
|
||||
#define OPT_NO_CLEANUP 1037
|
||||
#define OPT_PRINT_FPS 1038
|
||||
#define OPT_NO_POWER_ON 1039
|
||||
|
||||
struct sc_option {
|
||||
char shortopt;
|
||||
@@ -302,6 +303,11 @@ static const struct sc_option options[] = {
|
||||
"mipmaps are automatically generated to improve downscaling "
|
||||
"quality. This option disables the generation of mipmaps.",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_NO_POWER_ON,
|
||||
.longopt = "no-power-on",
|
||||
.text = "Do not power on the device on start.",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_OTG,
|
||||
.longopt = "otg",
|
||||
@@ -1598,6 +1604,9 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
case OPT_NO_CLEANUP:
|
||||
opts->cleanup = false;
|
||||
break;
|
||||
case OPT_NO_POWER_ON:
|
||||
opts->power_on = false;
|
||||
break;
|
||||
case OPT_PRINT_FPS:
|
||||
opts->start_fps_counter = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user