diff --git a/menu/cbs/menu_cbs_cancel.c b/menu/cbs/menu_cbs_cancel.c index 08b0528b93..5e58f11b3c 100644 --- a/menu/cbs/menu_cbs_cancel.c +++ b/menu/cbs/menu_cbs_cancel.c @@ -14,9 +14,11 @@ */ #include +#include #include "../menu_driver.h" #include "../menu_cbs.h" +#include "../../msg_hash.h" #ifndef BIND_ACTION_CANCEL #define BIND_ACTION_CANCEL(cbs, name) \ @@ -30,11 +32,24 @@ static int action_cancel_pop_default(const char *path, return menu_entry_go_back(); } +static int action_cancel_core_content(const char *path, + const char *label, unsigned type, size_t idx) +{ + menu_entries_flush_stack(msg_hash_to_str(MENU_ENUM_LABEL_ADD_CONTENT_LIST), 0); + return 0; +} + static int menu_cbs_init_bind_cancel_compare_label(menu_file_list_cbs_t *cbs, - const char *label, uint32_t hash, const char *elem0) + const char *label, uint32_t hash, const char *elem0, const char *menu_label) { uint32_t elem0_hash = msg_hash_calculate(elem0); + if (string_is_equal(menu_label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_LIST))) + { + BIND_ACTION_CANCEL(cbs, action_cancel_core_content); + return 0; + } + return -1; } @@ -47,15 +62,16 @@ static int menu_cbs_init_bind_cancel_compare_type( int menu_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, - const char *elem0, const char *elem1, + const char *elem0, const char *elem1, const char *menu_label, uint32_t label_hash, uint32_t menu_label_hash) { if (!cbs) return -1; + BIND_ACTION_CANCEL(cbs, action_cancel_pop_default); - if (menu_cbs_init_bind_cancel_compare_label(cbs, label, label_hash, elem0) == 0) + if (menu_cbs_init_bind_cancel_compare_label(cbs, label, label_hash, elem0, menu_label) == 0) return 0; if (menu_cbs_init_bind_cancel_compare_type( diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 05eaffa7f6..988549ac34 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1665,8 +1665,6 @@ static void cb_generic_dir_download(void *task_data, menu_file_transfer_t *transf = (menu_file_transfer_t*)user_data; http_transfer_data_t *data = (http_transfer_data_t*)task_data; - RARCH_LOG("transf->path: %s\n", transf->path); - generic_action_ok_network(transf->path, transf->path, 0, 0, 0, MENU_ENUM_LABEL_CB_CORE_CONTENT_LIST); } diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index ae95c40575..f536e8cb35 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -750,6 +750,12 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, return 0; } + if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_LIST))) + { + BIND_ACTION_GET_TITLE(cbs, action_get_download_core_content_list); + return 0; + } + if (cbs->enum_idx != MSG_UNKNOWN) { switch (cbs->enum_idx) diff --git a/menu/menu_cbs.c b/menu/menu_cbs.c index 744a5e20b0..2b4b0c45c9 100644 --- a/menu/menu_cbs.c +++ b/menu/menu_cbs.c @@ -85,7 +85,7 @@ void menu_cbs_init(void *data, menu_cbs_init_log(repr_label, "OK", cbs->action_ok_ident); - menu_cbs_init_bind_cancel(cbs, path, label, type, idx, elem0, elem1, label_hash, menu_label_hash); + menu_cbs_init_bind_cancel(cbs, path, label, type, idx, elem0, elem1, menu_label, label_hash, menu_label_hash); menu_cbs_init_log(repr_label, "CANCEL", cbs->action_cancel_ident); diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 0fb315c53e..2e3b4e812f 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -159,7 +159,7 @@ int menu_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs, int menu_cbs_init_bind_cancel(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx, - const char *elem0, const char *elem1, + const char *elem0, const char *elem1, const char *menu_label, uint32_t label_hash, uint32_t menu_label_hash); int menu_cbs_init_bind_ok(menu_file_list_cbs_t *cbs, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 6e5581f8a1..6c8db2bfd5 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2826,8 +2826,8 @@ static int menu_displaylist_parse_add_content_list( #ifdef HAVE_NETWORKING menu_entries_add_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT), - msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOAD_CORE_CONTENT), - MENU_ENUM_LABEL_DOWNLOAD_CORE_CONTENT, + msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOAD_CORE_CONTENT_DIRS), + MENU_ENUM_LABEL_DOWNLOAD_CORE_CONTENT_DIRS, MENU_SETTING_ACTION, 0, 0); #endif