Log control messages in verbose mode

PR #2371 <https://github.com/Genymobile/scrcpy/pull/2371>

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
Marti Raudsepp 2021-06-08 19:14:20 +03:00 committed by Romain Vimont
parent 937fa704a6
commit 19ca02cd8f
3 changed files with 134 additions and 0 deletions

View file

@ -48,6 +48,7 @@ controller_destroy(struct controller *controller) {
bool
controller_push_msg(struct controller *controller,
const struct control_msg *msg) {
control_msg_log(msg);
sc_mutex_lock(&controller->mutex);
bool was_empty = cbuf_is_empty(&controller->queue);
bool res = cbuf_push(&controller->queue, *msg);