Add --list-device-displays

This commit is contained in:
Romain Vimont
2023-02-23 23:10:15 +01:00
parent b05004cdd8
commit a7af7d9844
13 changed files with 68 additions and 27 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
@@ -851,9 +854,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;