mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 03:55:05 +00:00
Attempt to log message only in verbose mode
If the log level is not verbose, there is no need to attept to log control messages at all.
This commit is contained in:
parent
488991116b
commit
0de534d3bc
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@ controller_destroy(struct controller *controller) {
|
|||
bool
|
||||
controller_push_msg(struct controller *controller,
|
||||
const struct control_msg *msg) {
|
||||
control_msg_log(msg);
|
||||
if (sc_get_log_level() <= SC_LOG_LEVEL_VERBOSE) {
|
||||
control_msg_log(msg);
|
||||
}
|
||||
|
||||
sc_mutex_lock(&controller->mutex);
|
||||
bool was_empty = cbuf_is_empty(&controller->queue);
|
||||
bool res = cbuf_push(&controller->queue, *msg);
|
||||
|
|
Loading…
Add table
Reference in a new issue