Make camera id optional

If no camera id is provided, use the first camera available.
This commit is contained in:
Romain Vimont
2023-10-26 23:07:56 +02:00
parent 8735b388da
commit 5f30a68297
2 changed files with 20 additions and 7 deletions

View File

@@ -2205,12 +2205,6 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
return false;
}
if (!opts->camera_id) {
LOGE("Camera id must be specified by --camera-id=ID "
"(list the available ids with --list-cameras)");
return false;
}
if (!opts->camera_size) {
LOGE("Camera size must be specified by --camera-size=WIDTHxHEIGHT");
return false;