Skip to content

Commit

Permalink
Lock mutex before changing UI elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Master92 committed Sep 25, 2023
1 parent c1f785e commit 4e8c49e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/input_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 4e8c49e

Please sign in to comment.