mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-03 10:13:11 +00:00
(Menu) Cleanups
This commit is contained in:
parent
588a64dcf2
commit
74f202bbda
@ -54,7 +54,7 @@ static int deferred_push_dlist(menu_displaylist_info_t *info, enum menu_displayl
|
||||
{
|
||||
if (!menu_displaylist_ctl(state, info))
|
||||
return menu_cbs_exit();
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, info);
|
||||
menu_displaylist_process(info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ static int action_info_default(unsigned type, const char *label)
|
||||
if (!menu_displaylist_ctl(DISPLAYLIST_HELP, &info))
|
||||
return -1;
|
||||
|
||||
if (!menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info))
|
||||
if (!menu_displaylist_process(&info))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -786,7 +786,7 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
strlcpy(info.path, info_path, sizeof(info.path));
|
||||
|
||||
if (menu_displaylist_ctl(dl_type, &info))
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info))
|
||||
if (menu_displaylist_process(&info))
|
||||
return 0;
|
||||
|
||||
return menu_cbs_exit();
|
||||
|
@ -31,7 +31,7 @@ int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
||||
entry.list = list;
|
||||
entry.stack = menu_list;
|
||||
|
||||
if (!menu_displaylist_ctl(DISPLAYLIST_PUSH_ONTO_STACK, &entry))
|
||||
if (!menu_displaylist_push_onto_stack(&entry))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ bool generic_menu_init_list(void *data)
|
||||
info.list = selection_buf;
|
||||
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_MAIN_MENU, &info))
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
menu_displaylist_process(&info);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ static bool nk_menu_init_list(void *data)
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_HISTORY, &info))
|
||||
{
|
||||
info.need_push = true;
|
||||
return menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
return menu_displaylist_process(&info);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1773,7 +1773,7 @@ static void xmb_init_horizontal_list(xmb_handle_t *xmb)
|
||||
size_t i;
|
||||
for (i=0; i < xmb->horizontal_list->size; i++)
|
||||
xmb_node_allocate_userdata(xmb, (unsigned)i);
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
menu_displaylist_process(&info);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4003,7 +4003,7 @@ static int deferred_push_content_actions(menu_displaylist_info_t *info)
|
||||
if (!menu_displaylist_ctl(
|
||||
DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS, info))
|
||||
return -1;
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, info);
|
||||
menu_displaylist_process(&info);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4150,7 +4150,7 @@ static bool xmb_menu_init_list(void *data)
|
||||
|
||||
info.need_push = true;
|
||||
|
||||
if (!menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info))
|
||||
if (!menu_displaylist_process(&info))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -1140,7 +1140,7 @@ static bool zarch_menu_init_list(void *data)
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_HISTORY, &info))
|
||||
{
|
||||
info.need_push = true;
|
||||
return menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
return menu_displaylist_process(&info);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -4122,6 +4122,16 @@ void netplay_lan_scan_callback(void *task_data,
|
||||
}
|
||||
#endif
|
||||
|
||||
bool menu_displaylist_process(void *data)
|
||||
{
|
||||
return menu_displaylist_push_list_process((menu_displaylist_info_t*)data);
|
||||
}
|
||||
|
||||
bool menu_displaylist_push_onto_stack(void *data)
|
||||
{
|
||||
return menu_displaylist_push((menu_displaylist_ctx_entry_t*)data);
|
||||
}
|
||||
|
||||
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
{
|
||||
size_t i;
|
||||
@ -4137,16 +4147,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
bool use_filebrowser = false;
|
||||
menu_displaylist_info_t *info = (menu_displaylist_info_t*)data;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DISPLAYLIST_PROCESS:
|
||||
return menu_displaylist_push_list_process(info);
|
||||
case DISPLAYLIST_PUSH_ONTO_STACK:
|
||||
return menu_displaylist_push((menu_displaylist_ctx_entry_t*)data);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!info || !menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
||||
goto error;
|
||||
|
||||
@ -4165,12 +4165,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_NETPLAY_LAN_SCAN_SETTINGS_LIST:
|
||||
/* TODO/FIXME ? */
|
||||
break;
|
||||
case DISPLAYLIST_PUSH_ONTO_STACK:
|
||||
/* TODO/FIXME ? */
|
||||
break;
|
||||
case DISPLAYLIST_PROCESS:
|
||||
/* TODO/FIXME ? */
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_MANAGEMENT:
|
||||
/* TODO/FIXME ? */
|
||||
break;
|
||||
|
@ -158,8 +158,6 @@ enum menu_displaylist_ctl_state
|
||||
DISPLAYLIST_CORE_CONTENT,
|
||||
DISPLAYLIST_CORE_CONTENT_DIRS,
|
||||
DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR,
|
||||
DISPLAYLIST_PROCESS,
|
||||
DISPLAYLIST_PUSH_ONTO_STACK,
|
||||
DISPLAYLIST_PENDING_CLEAR
|
||||
};
|
||||
|
||||
@ -205,6 +203,9 @@ typedef struct menu_displaylist_ctx_entry
|
||||
file_list_t *list;
|
||||
} menu_displaylist_ctx_entry_t;
|
||||
|
||||
bool menu_displaylist_process(void *data);
|
||||
bool menu_displaylist_push_onto_stack(void *data);
|
||||
|
||||
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data);
|
||||
#ifdef HAVE_NETWORKING
|
||||
void netplay_refresh_rooms_menu(file_list_t *list);
|
||||
|
@ -731,7 +731,7 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
strlcpy(info.label, name, sizeof(info.label));
|
||||
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_GENERIC, &info))
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
menu_displaylist_process(&info);
|
||||
}
|
||||
/* fall-through. */
|
||||
case ST_BOOL:
|
||||
@ -1604,7 +1604,7 @@ void general_write_handler(void *data)
|
||||
info.enum_idx = MENU_ENUM_LABEL_HELP;
|
||||
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_GENERIC, &info))
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
menu_displaylist_process(&info);
|
||||
setting_set_with_string_representation(setting, "false");
|
||||
}
|
||||
break;
|
||||
|
@ -114,7 +114,7 @@ static int menu_input_key_bind_set_mode_common(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_CUSTOM_BIND), sizeof(info.label));
|
||||
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_INFO, &info))
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
menu_displaylist_process(&info);
|
||||
break;
|
||||
case MENU_INPUT_BINDS_CTL_BIND_ALL:
|
||||
menu_input_binds.target = &input_config_binds[index_offset][0];
|
||||
@ -130,7 +130,7 @@ static int menu_input_key_bind_set_mode_common(
|
||||
sizeof(info.label));
|
||||
|
||||
if (menu_displaylist_ctl(DISPLAYLIST_INFO, &info))
|
||||
menu_displaylist_ctl(DISPLAYLIST_PROCESS, &info);
|
||||
menu_displaylist_process(&info);
|
||||
break;
|
||||
default:
|
||||
case MENU_INPUT_BINDS_CTL_BIND_NONE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user