diff --git a/menu/cbs/menu_cbs_select.c b/menu/cbs/menu_cbs_select.c index 90c20e1aaf..52b8b51469 100644 --- a/menu/cbs/menu_cbs_select.c +++ b/menu/cbs/menu_cbs_select.c @@ -34,24 +34,15 @@ #define BIND_ACTION_SELECT(cbs, name) (cbs)->action_select = (name) #endif -static int action_select_default(const char *path, const char *label, unsigned type, +static int action_select_default( + const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { - menu_entry_t entry; int ret = 0; enum menu_action action = MENU_ACTION_NOOP; menu_file_list_cbs_t *cbs = NULL; file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0); - menu_entry_init(&entry); - /* Note: If menu_entry_action() is modified, - * will have to verify that these parameters - * remain unused... */ - entry.rich_label_enabled = false; - entry.value_enabled = false; - entry.sublabel_enabled = false; - menu_entry_get(&entry, 0, idx, NULL, false); - if (selection_buf) cbs = (menu_file_list_cbs_t*) file_list_get_actiondata_at_offset(selection_buf, idx); @@ -101,7 +92,20 @@ static int action_select_default(const char *path, const char *label, unsigned t } if (action != MENU_ACTION_NOOP) - ret = menu_entry_action(&entry, idx, action); + { + menu_entry_t entry; + menu_entry_init(&entry); + + /* Note: If menu_entry_action() is modified, + * will have to verify that these parameters + * remain unused... */ + entry.rich_label_enabled = false; + entry.value_enabled = false; + entry.sublabel_enabled = false; + menu_entry_get(&entry, 0, idx, NULL, false); + + ret = menu_entry_action(&entry, idx, action); + } task_queue_check();