diff --git a/menu/menu_entries_cbs_deferred_push.c b/menu/menu_entries_cbs_deferred_push.c index 8b33694988..cad73b80c7 100644 --- a/menu/menu_entries_cbs_deferred_push.c +++ b/menu/menu_entries_cbs_deferred_push.c @@ -450,6 +450,169 @@ static int deferred_push_default(menu_displaylist_info_t *info) return menu_displaylist_push_list(info, DISPLAYLIST_DEFAULT); } +int menu_entries_cbs_init_bind_deferred_push_compare_type(menu_file_list_cbs_t *cbs, unsigned type, + uint32_t label_hash) +{ + switch (label_hash) + { + case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST: +#ifdef HAVE_NETWORKING + cbs->action_deferred_push = deferred_push_core_updater_list; +#endif + break; + case MENU_LABEL_HISTORY_LIST: + cbs->action_deferred_push = deferred_push_history_list; + break; + case MENU_LABEL_DATABASE_MANAGER_LIST: + cbs->action_deferred_push = deferred_push_database_manager_list; + break; + case MENU_LABEL_CURSOR_MANAGER_LIST: + cbs->action_deferred_push = deferred_push_cursor_manager_list; + break; + case MENU_LABEL_CHEAT_FILE_LOAD: + cbs->action_deferred_push = deferred_push_cheat_file_load; + break; + case MENU_LABEL_REMAP_FILE_LOAD: + cbs->action_deferred_push = deferred_push_remap_file_load; + break; + case MENU_LABEL_RECORD_CONFIG: + cbs->action_deferred_push = deferred_push_record_configfile; + break; + case MENU_LABEL_CONTENT_ACTIONS: + cbs->action_deferred_push = deferred_push_content_actions; + break; + case MENU_LABEL_SHADER_OPTIONS: + cbs->action_deferred_push = deferred_push_shader_options; + break; + case MENU_LABEL_VIDEO_OPTIONS: + cbs->action_deferred_push = deferred_push_video_options; + break; + case MENU_LABEL_OPTIONS: + cbs->action_deferred_push = deferred_push_options; + break; + case MENU_LABEL_MANAGEMENT: + cbs->action_deferred_push = deferred_push_management_options; + break; + case MENU_LABEL_DEFERRED_CORE_LIST: + case MENU_LABEL_DEFERRED_CORE_LIST_SET: + cbs->action_deferred_push = deferred_push_core_list_deferred; + break; + case MENU_LABEL_DEFERRED_VIDEO_FILTER: + cbs->action_deferred_push = deferred_push_video_filter; + break; + case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST: + cbs->action_deferred_push = deferred_push_database_manager_list_deferred; + break; + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST: + cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred; + break; + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH: + case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR: + cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch; + break; + case MENU_LABEL_CORE_INFORMATION: + cbs->action_deferred_push = deferred_push_core_information; + break; + case MENU_LABEL_SYSTEM_INFORMATION: + cbs->action_deferred_push = deferred_push_system_information; + break; + case MENU_LABEL_PERFORMANCE_COUNTERS: + cbs->action_deferred_push = deferred_push_performance_counters; + break; + case MENU_LABEL_CORE_COUNTERS: + cbs->action_deferred_push = deferred_push_core_counters; + break; + case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS: + cbs->action_deferred_push = deferred_push_video_shader_preset_parameters; + break; + case MENU_LABEL_VIDEO_SHADER_PARAMETERS: + cbs->action_deferred_push = deferred_push_video_shader_parameters; + break; + case MENU_LABEL_SETTINGS: + cbs->action_deferred_push = deferred_push_settings; + break; + case MENU_LABEL_FRONTEND_COUNTERS: + cbs->action_deferred_push = deferred_push_frontend_counters; + break; + case MENU_LABEL_CORE_OPTIONS: + cbs->action_deferred_push = deferred_push_core_options; + break; + case MENU_LABEL_CORE_CHEAT_OPTIONS: + cbs->action_deferred_push = deferred_push_core_cheat_options; + break; + case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS: + cbs->action_deferred_push = deferred_push_core_input_remapping_options; + break; + case MENU_LABEL_DISK_OPTIONS: + cbs->action_deferred_push = deferred_push_disk_options; + break; + case MENU_LABEL_CORE_LIST: + cbs->action_deferred_push = deferred_push_core_list; + break; + case MENU_LABEL_CONTENT_COLLECTION_LIST: + cbs->action_deferred_push = deferred_push_content_collection_list; + break; + case MENU_LABEL_CONFIGURATIONS: + cbs->action_deferred_push = deferred_push_configurations; + break; + case MENU_LABEL_VIDEO_SHADER_PRESET: + cbs->action_deferred_push = deferred_push_video_shader_preset; + break; + case MENU_LABEL_VIDEO_SHADER_PASS: + cbs->action_deferred_push = deferred_push_video_shader_pass; + break; + case MENU_LABEL_VIDEO_FILTER: + cbs->action_deferred_push = deferred_push_video_filter; + break; + case MENU_LABEL_MENU_WALLPAPER: + cbs->action_deferred_push = deferred_push_images; + break; + case MENU_LABEL_AUDIO_DSP_PLUGIN: + cbs->action_deferred_push = deferred_push_audio_dsp_plugin; + break; + case MENU_LABEL_INPUT_OVERLAY: + cbs->action_deferred_push = deferred_push_input_overlay; + break; + case MENU_LABEL_INPUT_OSK_OVERLAY: + cbs->action_deferred_push = deferred_push_input_osk_overlay; + break; + case MENU_LABEL_VIDEO_FONT_PATH: + cbs->action_deferred_push = deferred_push_video_font_path; + break; + case MENU_LABEL_CONTENT_HISTORY_PATH: + cbs->action_deferred_push = deferred_push_content_history_path; + break; + case MENU_LABEL_DETECT_CORE_LIST: + cbs->action_deferred_push = deferred_push_detect_core_list; + break; + default: + return -1; + } + + if (type == MENU_SETTING_GROUP) + cbs->action_deferred_push = deferred_push_category; + else if (type == MENU_FILE_PLAYLIST_COLLECTION) + cbs->action_deferred_push = deferred_push_rdb_collection; + else + return -1; + + return 0; +} + void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, const char *elem0, const char *elem1, @@ -480,158 +643,5 @@ void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs, return; } - if (type == MENU_SETTING_GROUP) - cbs->action_deferred_push = deferred_push_category; - else if (type == MENU_FILE_PLAYLIST_COLLECTION) - cbs->action_deferred_push = deferred_push_rdb_collection; - else - { - switch (label_hash) - { - case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST: -#ifdef HAVE_NETWORKING - cbs->action_deferred_push = deferred_push_core_updater_list; -#endif - break; - case MENU_LABEL_HISTORY_LIST: - cbs->action_deferred_push = deferred_push_history_list; - break; - case MENU_LABEL_DATABASE_MANAGER_LIST: - cbs->action_deferred_push = deferred_push_database_manager_list; - break; - case MENU_LABEL_CURSOR_MANAGER_LIST: - cbs->action_deferred_push = deferred_push_cursor_manager_list; - break; - case MENU_LABEL_CHEAT_FILE_LOAD: - cbs->action_deferred_push = deferred_push_cheat_file_load; - break; - case MENU_LABEL_REMAP_FILE_LOAD: - cbs->action_deferred_push = deferred_push_remap_file_load; - break; - case MENU_LABEL_RECORD_CONFIG: - cbs->action_deferred_push = deferred_push_record_configfile; - break; - case MENU_LABEL_CONTENT_ACTIONS: - cbs->action_deferred_push = deferred_push_content_actions; - break; - case MENU_LABEL_SHADER_OPTIONS: - cbs->action_deferred_push = deferred_push_shader_options; - break; - case MENU_LABEL_VIDEO_OPTIONS: - cbs->action_deferred_push = deferred_push_video_options; - break; - case MENU_LABEL_OPTIONS: - cbs->action_deferred_push = deferred_push_options; - break; - case MENU_LABEL_MANAGEMENT: - cbs->action_deferred_push = deferred_push_management_options; - break; - case MENU_LABEL_DEFERRED_CORE_LIST: - case MENU_LABEL_DEFERRED_CORE_LIST_SET: - cbs->action_deferred_push = deferred_push_core_list_deferred; - break; - case MENU_LABEL_DEFERRED_VIDEO_FILTER: - cbs->action_deferred_push = deferred_push_video_filter; - break; - case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST: - cbs->action_deferred_push = deferred_push_database_manager_list_deferred; - break; - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST: - cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred; - break; - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH: - case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR: - cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch; - break; - case MENU_LABEL_CORE_INFORMATION: - cbs->action_deferred_push = deferred_push_core_information; - break; - case MENU_LABEL_SYSTEM_INFORMATION: - cbs->action_deferred_push = deferred_push_system_information; - break; - case MENU_LABEL_PERFORMANCE_COUNTERS: - cbs->action_deferred_push = deferred_push_performance_counters; - break; - case MENU_LABEL_CORE_COUNTERS: - cbs->action_deferred_push = deferred_push_core_counters; - break; - case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS: - cbs->action_deferred_push = deferred_push_video_shader_preset_parameters; - break; - case MENU_LABEL_VIDEO_SHADER_PARAMETERS: - cbs->action_deferred_push = deferred_push_video_shader_parameters; - break; - case MENU_LABEL_SETTINGS: - cbs->action_deferred_push = deferred_push_settings; - break; - case MENU_LABEL_FRONTEND_COUNTERS: - cbs->action_deferred_push = deferred_push_frontend_counters; - break; - case MENU_LABEL_CORE_OPTIONS: - cbs->action_deferred_push = deferred_push_core_options; - break; - case MENU_LABEL_CORE_CHEAT_OPTIONS: - cbs->action_deferred_push = deferred_push_core_cheat_options; - break; - case MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS: - cbs->action_deferred_push = deferred_push_core_input_remapping_options; - break; - case MENU_LABEL_DISK_OPTIONS: - cbs->action_deferred_push = deferred_push_disk_options; - break; - case MENU_LABEL_CORE_LIST: - cbs->action_deferred_push = deferred_push_core_list; - break; - case MENU_LABEL_CONTENT_COLLECTION_LIST: - cbs->action_deferred_push = deferred_push_content_collection_list; - break; - case MENU_LABEL_CONFIGURATIONS: - cbs->action_deferred_push = deferred_push_configurations; - break; - case MENU_LABEL_VIDEO_SHADER_PRESET: - cbs->action_deferred_push = deferred_push_video_shader_preset; - break; - case MENU_LABEL_VIDEO_SHADER_PASS: - cbs->action_deferred_push = deferred_push_video_shader_pass; - break; - case MENU_LABEL_VIDEO_FILTER: - cbs->action_deferred_push = deferred_push_video_filter; - break; - case MENU_LABEL_MENU_WALLPAPER: - cbs->action_deferred_push = deferred_push_images; - break; - case MENU_LABEL_AUDIO_DSP_PLUGIN: - cbs->action_deferred_push = deferred_push_audio_dsp_plugin; - break; - case MENU_LABEL_INPUT_OVERLAY: - cbs->action_deferred_push = deferred_push_input_overlay; - break; - case MENU_LABEL_INPUT_OSK_OVERLAY: - cbs->action_deferred_push = deferred_push_input_osk_overlay; - break; - case MENU_LABEL_VIDEO_FONT_PATH: - cbs->action_deferred_push = deferred_push_video_font_path; - break; - case MENU_LABEL_CONTENT_HISTORY_PATH: - cbs->action_deferred_push = deferred_push_content_history_path; - break; - case MENU_LABEL_DETECT_CORE_LIST: - cbs->action_deferred_push = deferred_push_detect_core_list; - break; - } - } + menu_entries_cbs_init_bind_deferred_push_compare_type(cbs, type, label_hash); }