mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-28 21:55:27 +00:00
Remove menu_parse_check
This commit is contained in:
parent
a7c49cc3dc
commit
fad3cbdb50
@ -729,27 +729,6 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_parse_check(const char *label, unsigned menu_type)
|
||||
{
|
||||
#if 0
|
||||
RARCH_LOG("label is menu_parse_check: %s\n", label);
|
||||
#endif
|
||||
if (
|
||||
menu_type == MENU_FILE_CATEGORY ||
|
||||
!strcmp(label, "Main Menu") ||
|
||||
!strcmp(label, "settings") ||
|
||||
!strcmp(label, "performance_counters") ||
|
||||
!strcmp(label, "core_counters") ||
|
||||
!strcmp(label, "frontend_counters") ||
|
||||
!strcmp(label, "Input Options") ||
|
||||
!strcmp(label, "Shader Options") ||
|
||||
!strcmp(label, "video_shader_preset_parameters") ||
|
||||
!strcmp(label, "video_shader_parameters")
|
||||
)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_entries_deferred_push(file_list_t *list, file_list_t *menu_list)
|
||||
{
|
||||
unsigned type = 0;
|
||||
@ -760,13 +739,8 @@ int menu_entries_deferred_push(file_list_t *list, file_list_t *menu_list)
|
||||
|
||||
file_list_get_last(menu_list, &path, &label, &type);
|
||||
|
||||
if (((menu_parse_check(label, type)) == -1))
|
||||
{
|
||||
if (strcmp(label, "history_list") != 0)
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
}
|
||||
|
||||
RARCH_LOG("label is: %s\n", label);
|
||||
if (!strcmp(label, "Main Menu"))
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
cbs = (menu_file_list_cbs_t*)
|
||||
file_list_get_last_actiondata(menu_list);
|
||||
|
@ -1338,6 +1338,132 @@ static int deferred_push_core_information(void *data, void *userdata,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_performance_counters(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_video_shader_preset_parameters(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_video_shader_parameters(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_settings(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_category(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_input_options(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_shader_options(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_core_counters(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_frontend_counters(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
file_list_t *list = (file_list_t*)data;
|
||||
file_list_t *menu_list = (file_list_t*)userdata;
|
||||
|
||||
if (!list || !menu_list)
|
||||
return -1;
|
||||
|
||||
return push_list(driver.menu, list, path, label, type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int deferred_push_core_options(void *data, void *userdata,
|
||||
const char *path, const char *label, unsigned type)
|
||||
{
|
||||
@ -1814,18 +1940,36 @@ static void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
|
||||
cbs->action_deferred_push = deferred_push_default;
|
||||
|
||||
if (!strcmp(label, "deferred_core_list"))
|
||||
if (!strcmp(label, "history_list"))
|
||||
cbs->action_deferred_push = deferred_push_history_list;
|
||||
else if (type == MENU_FILE_CATEGORY)
|
||||
cbs->action_deferred_push = deferred_push_category;
|
||||
else if (!strcmp(label, "deferred_core_list"))
|
||||
cbs->action_deferred_push = deferred_push_core_list_deferred;
|
||||
else if (!strcmp(label, "Input Options"))
|
||||
cbs->action_deferred_push = deferred_push_input_options;
|
||||
else if (!strcmp(label, "Shader Options"))
|
||||
cbs->action_deferred_push = deferred_push_shader_options;
|
||||
else if (!strcmp(label, "core_information"))
|
||||
cbs->action_deferred_push = deferred_push_core_information;
|
||||
else if (!strcmp(label, "performance_counters"))
|
||||
cbs->action_deferred_push = deferred_push_performance_counters;
|
||||
else if (!strcmp(label, "core_counters"))
|
||||
cbs->action_deferred_push = deferred_push_core_counters;
|
||||
else if (!strcmp(label, "video_shader_preset_parameters"))
|
||||
cbs->action_deferred_push = deferred_push_video_shader_preset_parameters;
|
||||
else if (!strcmp(label, "video_shader_parameters"))
|
||||
cbs->action_deferred_push = deferred_push_video_shader_parameters;
|
||||
else if (!strcmp(label, "settings"))
|
||||
cbs->action_deferred_push = deferred_push_settings;
|
||||
else if (!strcmp(label, "frontend_counters"))
|
||||
cbs->action_deferred_push = deferred_push_frontend_counters;
|
||||
else if (!strcmp(label, "core_options"))
|
||||
cbs->action_deferred_push = deferred_push_core_options;
|
||||
else if (!strcmp(label, "disk_options"))
|
||||
cbs->action_deferred_push = deferred_push_disk_options;
|
||||
else if (!strcmp(label, "core_list"))
|
||||
cbs->action_deferred_push = deferred_push_core_list;
|
||||
else if (!strcmp(label, "history_list"))
|
||||
cbs->action_deferred_push = deferred_push_history_list;
|
||||
else if (!strcmp(label, "configurations"))
|
||||
cbs->action_deferred_push = deferred_push_configurations;
|
||||
else if (!strcmp(label, "video_shader_preset"))
|
||||
|
Loading…
Reference in New Issue
Block a user