mirror of
https://github.com/libretro/RetroArch
synced 2025-04-25 09:02:44 +00:00
Simplify action_select_default
This commit is contained in:
parent
f1373abf2d
commit
123e47b33d
@ -24,27 +24,11 @@ static int action_select_default(const char *path, const char *label, unsigned t
|
|||||||
size_t idx)
|
size_t idx)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
menu_entry_t entry;
|
menu_entry_t entry = {{0}};
|
||||||
enum menu_action action = MENU_ACTION_NOOP;
|
|
||||||
menu_file_list_cbs_t *cbs = NULL;
|
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
|
||||||
rarch_setting_t *setting = menu_setting_find(
|
|
||||||
menu_list->selection_buf->list[idx].label);
|
|
||||||
|
|
||||||
menu_entry_get(&entry, idx, NULL, false);
|
menu_entry_get(&entry, idx, NULL, false);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(menu_list->selection_buf, idx);
|
ret = menu_entry_action(&entry, idx, MENU_ACTION_SELECT);
|
||||||
|
|
||||||
if ((cbs && cbs->action_ok) || menu_setting_is_of_general_type(setting))
|
|
||||||
action = MENU_ACTION_OK;
|
|
||||||
else { if (cbs && cbs->action_start)
|
|
||||||
action = MENU_ACTION_START;
|
|
||||||
if (cbs && cbs->action_right)
|
|
||||||
action = MENU_ACTION_RIGHT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (action != MENU_ACTION_NOOP)
|
|
||||||
ret = menu_entry_action(&entry, idx, action);
|
|
||||||
|
|
||||||
rarch_main_data_iterate();
|
rarch_main_data_iterate();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user