Fix output selection

pull/1/head
Drew DeVault 2019-12-30 16:13:44 -05:00
parent 88f8428ffe
commit 38c872b2ba
1 changed files with 7 additions and 6 deletions

View File

@ -504,6 +504,7 @@ int wayvnc_usage(FILE* stream, int rc)
"Usage: wayvnc [options]\n"
"\n"
" -c,--frame-capturing=screencopy|dmabuf Select frame capturing backend.\n"
" -o,--output=<id> Select output to capture.\n"
" -k,--keyboard=<layout> Select keyboard layout.\n"
" -h,--help Get help (this text).\n"
"\n";
@ -577,12 +578,12 @@ int main(int argc, char* argv[])
log_error("No such output\n");
goto failure;
}
}
out = output_first(&self.outputs);
if (!out) {
log_error("No output found\n");
goto failure;
} else {
out = output_first(&self.outputs);
if (!out) {
log_error("No output found\n");
goto failure;
}
}
self.selected_output = out;