mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Move control messages logging
Log a control message when they are sent, not when they are pushed to the message queue.
This commit is contained in:
parent
ccfd3269d4
commit
4b2cb2da57
1 changed files with 4 additions and 4 deletions
|
|
@ -92,10 +92,6 @@ sc_controller_destroy(struct sc_controller *controller) {
|
|||
bool
|
||||
sc_controller_push_msg(struct sc_controller *controller,
|
||||
const struct sc_control_msg *msg) {
|
||||
if (sc_get_log_level() <= SC_LOG_LEVEL_VERBOSE) {
|
||||
sc_control_msg_log(msg);
|
||||
}
|
||||
|
||||
bool pushed = false;
|
||||
|
||||
sc_mutex_lock(&controller->mutex);
|
||||
|
|
@ -166,6 +162,10 @@ run_controller(void *data) {
|
|||
struct sc_control_msg msg = sc_vecdeque_pop(&controller->queue);
|
||||
sc_mutex_unlock(&controller->mutex);
|
||||
|
||||
if (sc_get_log_level() <= SC_LOG_LEVEL_VERBOSE) {
|
||||
sc_control_msg_log(&msg);
|
||||
}
|
||||
|
||||
bool eos;
|
||||
bool ok = process_msg(controller, &msg, &eos);
|
||||
sc_control_msg_destroy(&msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue