Skip to content

Commit

Permalink
fix rbtn lvgl mutex lock
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner authored and bkleiner committed Feb 19, 2023
1 parent 575e4ff commit 591d5e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/input_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ static void btn_click(void) // short press enter key
}

static void rbtn_click0(bool is_short) {
// lvgl mutex is already locked either via lv_timer or manually bellow

switch (g_menu_op) {
case OPLEVEL_SUBMENU:
pthread_mutex_lock(&lvgl_mutex);
submenu_right_button(is_short);
pthread_mutex_unlock(&lvgl_mutex);
break;

case OPLEVEL_VIDEO:
Expand Down Expand Up @@ -284,7 +284,9 @@ void rbtn_click(bool is_short) {
}
}
} else {
pthread_mutex_lock(&lvgl_mutex);
rbtn_click0(false);
pthread_mutex_unlock(&lvgl_mutex);
}
}

Expand Down

0 comments on commit 591d5e9

Please sign in to comment.