mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 23:42:30 +00:00
(CocoaTouch) Start using menu_list_get_entry
This commit is contained in:
parent
50944bb1e1
commit
132605b24b
@ -898,25 +898,18 @@ void get_core_title(char *title_msg, size_t title_msg_len)
|
|||||||
// JM: This could be moved down to RA
|
// JM: This could be moved down to RA
|
||||||
uint32_t menu_select_entry(uint32_t i)
|
uint32_t menu_select_entry(uint32_t i)
|
||||||
{
|
{
|
||||||
|
menu_entry_t entry;
|
||||||
rarch_setting_t *setting;
|
rarch_setting_t *setting;
|
||||||
menu_file_list_cbs_t *cbs = NULL;
|
menu_file_list_cbs_t *cbs = NULL;
|
||||||
const char *path = NULL, *entry_label = NULL;
|
|
||||||
unsigned type = 0;
|
|
||||||
const char *dir = NULL;
|
|
||||||
const char *label = NULL;
|
|
||||||
unsigned menu_type = 0;
|
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
menu_list_t *menu_list = menu_list_get_ptr();
|
||||||
|
|
||||||
menu_list_get_last_stack(menu_list, &dir, &label, &menu_type);
|
|
||||||
|
|
||||||
menu_list_get_at_offset(menu_list->selection_buf, i, &path,
|
|
||||||
&entry_label, &type);
|
|
||||||
|
|
||||||
setting = setting_find_setting
|
setting = setting_find_setting
|
||||||
(menu->list_settings,
|
(menu->list_settings,
|
||||||
menu_list->selection_buf->list[i].label);
|
menu_list->selection_buf->list[i].label);
|
||||||
|
|
||||||
|
menu_list_get_entry(&entry, i, NULL, false);
|
||||||
|
|
||||||
cbs = (menu_file_list_cbs_t*)
|
cbs = (menu_file_list_cbs_t*)
|
||||||
menu_list_get_actiondata_at_offset(menu_list->selection_buf, i);
|
menu_list_get_actiondata_at_offset(menu_list->selection_buf, i);
|
||||||
@ -927,7 +920,7 @@ uint32_t menu_select_entry(uint32_t i)
|
|||||||
{
|
{
|
||||||
nav->selection_ptr = i;
|
nav->selection_ptr = i;
|
||||||
if (cbs && cbs->action_ok)
|
if (cbs && cbs->action_ok)
|
||||||
cbs->action_ok(path, entry_label, type, i);
|
cbs->action_ok(entry.path, entry.label, entry.type, i);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -935,13 +928,13 @@ uint32_t menu_select_entry(uint32_t i)
|
|||||||
{
|
{
|
||||||
nav->selection_ptr = i;
|
nav->selection_ptr = i;
|
||||||
if (cbs && cbs->action_ok)
|
if (cbs && cbs->action_ok)
|
||||||
cbs->action_ok(path, entry_label, type, i);
|
cbs->action_ok(entry.path, entry.label, entry.type, i);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cbs && cbs->action_start)
|
if (cbs && cbs->action_start)
|
||||||
cbs->action_start(type, entry_label, MENU_ACTION_START);
|
cbs->action_start(entry.type, entry.label, MENU_ACTION_START);
|
||||||
if (cbs && cbs->action_toggle)
|
if (cbs && cbs->action_toggle)
|
||||||
cbs->action_toggle(type, entry_label, MENU_ACTION_RIGHT, true);
|
cbs->action_toggle(entry.type, entry.label, MENU_ACTION_RIGHT, true);
|
||||||
menu_list_push_stack(menu_list, "",
|
menu_list_push_stack(menu_list, "",
|
||||||
"info_screen", 0, i);
|
"info_screen", 0, i);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user