2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-08-31 14:25:56 +00:00

Factorize --list- options handling

This will limit code duplication as more list options will be added.

PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>
This commit is contained in:
Romain Vimont
2023-10-24 23:54:56 +02:00
parent a2fb1b40f6
commit f085765e04
8 changed files with 17 additions and 15 deletions

View File

@@ -1993,10 +1993,10 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
return false;
#endif
case OPT_LIST_ENCODERS:
opts->list_encoders = true;
opts->list |= SC_OPTION_LIST_ENCODERS;
break;
case OPT_LIST_DISPLAYS:
opts->list_displays = true;
opts->list |= SC_OPTION_LIST_DISPLAYS;
break;
case OPT_REQUIRE_AUDIO:
opts->require_audio = true;