diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 0274e7b859..22633ddf80 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1356,6 +1356,8 @@ static int action_ok_download_generic(const char *path, else if (!strcmp(type_msg, "cb_update_autoconfig_profiles_hid")) path = "autoconf_hid.zip"; #endif + else if (!strcmp(type_msg, "cb_update_core_info_files")) + path = "info.zip"; else if (!strcmp(type_msg, "cb_update_cheats")) path = "cheats.zip"; else if (!strcmp(type_msg, "cb_update_overlays")) @@ -1416,6 +1418,14 @@ static int action_ok_update_assets(const char *path, return 0; } +static int action_ok_update_core_info_files(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + action_ok_download_generic(path, label, type, idx, entry_idx, + "cb_update_core_info_files"); + return 0; +} + static int action_ok_update_overlays(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -1866,6 +1876,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_LABEL_UPDATE_ASSETS: cbs->action_ok = action_ok_update_assets; break; + case MENU_LABEL_UPDATE_CORE_INFO_FILES: + cbs->action_ok = action_ok_update_core_info_files; + break; case MENU_LABEL_UPDATE_OVERLAYS: cbs->action_ok = action_ok_update_overlays; break; diff --git a/menu/intl/menu_hash_us.c b/menu/intl/menu_hash_us.c index 6c10a3dd47..b25c5bb8b7 100644 --- a/menu/intl/menu_hash_us.c +++ b/menu/intl/menu_hash_us.c @@ -26,6 +26,8 @@ static const char *menu_hash_to_str_us_label(uint32_t hash) { switch (hash) { + case MENU_LABEL_UPDATE_CORE_INFO_FILES: + return "update_core_info_files"; case MENU_LABEL_DEFERRED_CORE_CONTENT_LIST: return "deferred_core_content_list"; case MENU_LABEL_DOWNLOAD_CORE_CONTENT: @@ -608,6 +610,8 @@ const char *menu_hash_to_str_us(uint32_t hash) switch (hash) { + case MENU_LABEL_VALUE_UPDATE_CORE_INFO_FILES: + return "Update Core Info Files"; case MENU_LABEL_VALUE_DOWNLOAD_CORE_CONTENT: return "Download Content"; case MENU_LABEL_VALUE_SCAN_THIS_DIRECTORY: diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index ebc59a2c55..48c1d11644 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1715,6 +1715,11 @@ static int menu_displaylist_parse_options(menu_displaylist_info_t *info) menu_hash_to_str(MENU_LABEL_CORE_UPDATER_LIST), MENU_SETTING_ACTION, 0, 0); + menu_list_push(info->list, + menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_CORE_INFO_FILES), + menu_hash_to_str(MENU_LABEL_UPDATE_CORE_INFO_FILES), + MENU_SETTING_ACTION, 0, 0); + menu_list_push(info->list, menu_hash_to_str(MENU_LABEL_VALUE_UPDATE_ASSETS), menu_hash_to_str(MENU_LABEL_UPDATE_ASSETS), diff --git a/menu/menu_hash.h b/menu/menu_hash.h index 339e3813f2..bef9db117f 100644 --- a/menu/menu_hash.h +++ b/menu/menu_hash.h @@ -22,6 +22,8 @@ extern "C" { #endif +#define MENU_LABEL_VALUE_UPDATE_CORE_INFO_FILES 0xba274810U +#define MENU_LABEL_UPDATE_CORE_INFO_FILES 0x620d758dU #define MENU_VALUE_SEARCH 0xd0d5febbU diff --git a/tasks/task_http.c b/tasks/task_http.c index f06ec39a23..473a61488d 100644 --- a/tasks/task_http.c +++ b/tasks/task_http.c @@ -30,6 +30,7 @@ #define CB_CORE_UPDATER_DOWNLOAD 0x7412da7dU #define CB_CORE_UPDATER_LIST 0x32fd4f01U #define CB_UPDATE_ASSETS 0xbf85795eU +#define CB_UPDATE_CORE_INFO_FILES 0xe6084091U #define CB_UPDATE_AUTOCONFIG_PROFILES 0x28ada67dU #define CB_UPDATE_CHEATS 0xc360fec3U #define CB_UPDATE_OVERLAYS 0x699009a0U @@ -143,6 +144,12 @@ static int cb_core_content_download(void *data, size_t len) return cb_generic_download(data, len, settings->core_assets_directory); } +static int cb_update_core_info_files(void *data, size_t len) +{ + settings_t *settings = config_get_ptr(); + return cb_generic_download(data, len, settings->libretro_info_path); +} + static int cb_update_assets(void *data, size_t len) { settings_t *settings = config_get_ptr(); @@ -279,6 +286,9 @@ static int cb_http_conn_default(void *data_, size_t len) case CB_UPDATE_ASSETS: http->cb = &cb_update_assets; break; + case CB_UPDATE_CORE_INFO_FILES: + http->cb = &cb_update_core_info_files; + break; case CB_UPDATE_AUTOCONFIG_PROFILES: http->cb = &cb_update_autoconfig_profiles; break;