(menu_entries_cbs_deferred_push.c) Refactor

This commit is contained in:
twinaphex 2015-06-05 13:03:29 +02:00
parent 1d1a301b29
commit f84af7ed8b
1 changed files with 151 additions and 105 deletions

View File

@ -481,112 +481,158 @@ void menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
return; return;
} }
#ifdef HAVE_NETWORKING if (type == MENU_SETTING_GROUP)
else if (hash == MENU_LABEL_DEFERRED_CORE_UPDATER_LIST)
cbs->action_deferred_push = deferred_push_core_updater_list;
#endif
else if (hash == MENU_LABEL_HISTORY_LIST)
cbs->action_deferred_push = deferred_push_history_list;
else if (hash == MENU_LABEL_DATABASE_MANAGER_LIST)
cbs->action_deferred_push = deferred_push_database_manager_list;
else if (hash == MENU_LABEL_CURSOR_MANAGER_LIST)
cbs->action_deferred_push = deferred_push_cursor_manager_list;
else if (hash == MENU_LABEL_CHEAT_FILE_LOAD)
cbs->action_deferred_push = deferred_push_cheat_file_load;
else if (hash == MENU_LABEL_REMAP_FILE_LOAD)
cbs->action_deferred_push = deferred_push_remap_file_load;
else if (hash == MENU_LABEL_RECORD_CONFIG)
cbs->action_deferred_push = deferred_push_record_configfile;
else if (hash == MENU_LABEL_CONTENT_ACTIONS)
cbs->action_deferred_push = deferred_push_content_actions;
else if (hash == MENU_LABEL_SHADER_OPTIONS)
cbs->action_deferred_push = deferred_push_shader_options;
else if (hash == MENU_LABEL_VIDEO_OPTIONS)
cbs->action_deferred_push = deferred_push_video_options;
else if (hash == MENU_LABEL_OPTIONS)
cbs->action_deferred_push = deferred_push_options;
else if (hash == MENU_LABEL_MANAGEMENT)
cbs->action_deferred_push = deferred_push_management_options;
else if (type == MENU_SETTING_GROUP)
cbs->action_deferred_push = deferred_push_category; cbs->action_deferred_push = deferred_push_category;
else if (type == MENU_FILE_PLAYLIST_COLLECTION) else if (type == MENU_FILE_PLAYLIST_COLLECTION)
cbs->action_deferred_push = deferred_push_rdb_collection; cbs->action_deferred_push = deferred_push_rdb_collection;
else if ((hash == MENU_LABEL_DEFERRED_CORE_LIST) || else
(hash == MENU_LABEL_DEFERRED_CORE_LIST_SET)) {
cbs->action_deferred_push = deferred_push_core_list_deferred; switch (hash)
else if (hash == MENU_LABEL_DEFERRED_VIDEO_FILTER) {
cbs->action_deferred_push = deferred_push_video_filter; case MENU_LABEL_DEFERRED_CORE_UPDATER_LIST:
else if (hash == MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST) #ifdef HAVE_NETWORKING
cbs->action_deferred_push = deferred_push_database_manager_list_deferred; cbs->action_deferred_push = deferred_push_core_updater_list;
else if (hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST) #endif
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred; break;
else if ( case MENU_LABEL_HISTORY_LIST:
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER) || cbs->action_deferred_push = deferred_push_history_list;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER) || break;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN) || case MENU_LABEL_DATABASE_MANAGER_LIST:
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE) || cbs->action_deferred_push = deferred_push_database_manager_list;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW) || break;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING) || case MENU_LABEL_CURSOR_MANAGER_LIST:
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING) || cbs->action_deferred_push = deferred_push_cursor_manager_list;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING) || break;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING) || case MENU_LABEL_CHEAT_FILE_LOAD:
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING) || cbs->action_deferred_push = deferred_push_cheat_file_load;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING) || break;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE) || case MENU_LABEL_REMAP_FILE_LOAD:
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING) || cbs->action_deferred_push = deferred_push_remap_file_load;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS) || break;
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH) || case MENU_LABEL_RECORD_CONFIG:
(hash == MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR) cbs->action_deferred_push = deferred_push_record_configfile;
) break;
cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch; case MENU_LABEL_CONTENT_ACTIONS:
else if (hash == MENU_LABEL_CORE_INFORMATION) cbs->action_deferred_push = deferred_push_content_actions;
cbs->action_deferred_push = deferred_push_core_information; break;
else if (hash == MENU_LABEL_SYSTEM_INFORMATION) case MENU_LABEL_SHADER_OPTIONS:
cbs->action_deferred_push = deferred_push_system_information; cbs->action_deferred_push = deferred_push_shader_options;
else if (hash == MENU_LABEL_PERFORMANCE_COUNTERS) break;
cbs->action_deferred_push = deferred_push_performance_counters; case MENU_LABEL_VIDEO_OPTIONS:
else if (hash == MENU_LABEL_CORE_COUNTERS) cbs->action_deferred_push = deferred_push_video_options;
cbs->action_deferred_push = deferred_push_core_counters; break;
else if (hash == MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS) case MENU_LABEL_OPTIONS:
cbs->action_deferred_push = deferred_push_video_shader_preset_parameters; cbs->action_deferred_push = deferred_push_options;
else if (hash == MENU_LABEL_VIDEO_SHADER_PARAMETERS) break;
cbs->action_deferred_push = deferred_push_video_shader_parameters; case MENU_LABEL_MANAGEMENT:
else if (hash == MENU_LABEL_SETTINGS) cbs->action_deferred_push = deferred_push_management_options;
cbs->action_deferred_push = deferred_push_settings; break;
else if (hash == MENU_LABEL_FRONTEND_COUNTERS) case MENU_LABEL_DEFERRED_CORE_LIST:
cbs->action_deferred_push = deferred_push_frontend_counters; case MENU_LABEL_DEFERRED_CORE_LIST_SET:
else if (hash == MENU_LABEL_CORE_OPTIONS) cbs->action_deferred_push = deferred_push_core_list_deferred;
cbs->action_deferred_push = deferred_push_core_options; break;
else if (hash == MENU_LABEL_CORE_CHEAT_OPTIONS) case MENU_LABEL_DEFERRED_VIDEO_FILTER:
cbs->action_deferred_push = deferred_push_core_cheat_options; cbs->action_deferred_push = deferred_push_video_filter;
else if (hash == MENU_LABEL_CORE_INPUT_REMAPPING_OPTIONS) break;
cbs->action_deferred_push = deferred_push_core_input_remapping_options; case MENU_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
else if (hash == MENU_LABEL_DISK_OPTIONS) cbs->action_deferred_push = deferred_push_database_manager_list_deferred;
cbs->action_deferred_push = deferred_push_disk_options; break;
else if (hash == MENU_LABEL_CORE_LIST) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
cbs->action_deferred_push = deferred_push_core_list; cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred;
else if (hash == MENU_LABEL_CONTENT_COLLECTION_LIST) break;
cbs->action_deferred_push = deferred_push_content_collection_list; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
else if (hash == MENU_LABEL_CONFIGURATIONS) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
cbs->action_deferred_push = deferred_push_configurations; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN:
else if (hash == MENU_LABEL_VIDEO_SHADER_PRESET) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE:
cbs->action_deferred_push = deferred_push_video_shader_preset; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW:
else if (hash == MENU_LABEL_VIDEO_SHADER_PASS) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING:
cbs->action_deferred_push = deferred_push_video_shader_pass; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING:
else if (hash == MENU_LABEL_VIDEO_FILTER) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING:
cbs->action_deferred_push = deferred_push_video_filter; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING:
else if (hash == MENU_LABEL_MENU_WALLPAPER) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING:
cbs->action_deferred_push = deferred_push_images; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING:
else if (hash == MENU_LABEL_AUDIO_DSP_PLUGIN) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
cbs->action_deferred_push = deferred_push_audio_dsp_plugin; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING:
else if (hash == MENU_LABEL_INPUT_OVERLAY) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS:
cbs->action_deferred_push = deferred_push_input_overlay; case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH:
else if (hash == MENU_LABEL_INPUT_OSK_OVERLAY) case MENU_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR:
cbs->action_deferred_push = deferred_push_input_osk_overlay; cbs->action_deferred_push = deferred_push_cursor_manager_list_deferred_query_subsearch;
else if (hash == MENU_LABEL_VIDEO_FONT_PATH) break;
cbs->action_deferred_push = deferred_push_video_font_path; case MENU_LABEL_CORE_INFORMATION:
else if (hash == MENU_LABEL_CONTENT_HISTORY_PATH) cbs->action_deferred_push = deferred_push_core_information;
cbs->action_deferred_push = deferred_push_content_history_path; break;
else if (hash == MENU_LABEL_DETECT_CORE_LIST) case MENU_LABEL_SYSTEM_INFORMATION:
cbs->action_deferred_push = deferred_push_detect_core_list; 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;
}
}
} }