From 4e8c49ec33777aaa0cc47894a6c2617d1adfe847 Mon Sep 17 00:00:00 2001 From: Master92 Date: Mon, 25 Sep 2023 08:49:27 +0200 Subject: [PATCH] Lock mutex before changing UI elements --- src/core/input_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/input_device.c b/src/core/input_device.c index 5bc4c3ef..9a069cd1 100644 --- a/src/core/input_device.c +++ b/src/core/input_device.c @@ -280,7 +280,9 @@ void rbtn_click(right_button_t click_type) { if (click_type == RIGHT_CLICK) { dvr_cmd(DVR_TOGGLE); } else if (click_type == RIGHT_LONG_PRESS) { + pthread_mutex_lock(&lvgl_mutex); step_topfan(); + pthread_mutex_unlock(&lvgl_mutex); } else if (click_type == RIGHT_DOUBLE_CLICK) { ht_set_center_position(); }