Add --list-displays

Add an option to list the device displays properly.
This commit is contained in:
Romain Vimont
2023-02-23 23:10:15 +01:00
parent 2596ca02f0
commit b65301f672
14 changed files with 69 additions and 28 deletions

View File

@@ -303,6 +303,9 @@ execute_server(struct sc_server *server,
if (params->list_encoders) {
ADD_PARAM("list_encoders=true");
}
if (params->list_displays) {
ADD_PARAM("list_displays=true");
}
#undef ADD_PARAM
@@ -856,9 +859,9 @@ run_server(void *data) {
goto error_connection_failed;
}
// If --list-encoders is passed, then the server just prints the encoders
// If --list-* is passed, then the server just prints the requested data
// then exits.
if (params->list_encoders) {
if (params->list_encoders || params->list_displays) {
sc_pid pid = execute_server(server, params);
if (pid == SC_PROCESS_NONE) {
goto error_connection_failed;