From 98e6df93cb1e86b4ccb35bf1251a49d24ac74707 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 30 Nov 2015 05:36:36 +0100 Subject: [PATCH] Automatically reinit after asset extraction succeeded for CB_UPDATE_ASSETS --- menu/cbs/menu_cbs_deferred_push.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index 8073196f5f..b62d786348 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -341,6 +341,9 @@ static void cb_decompressed(void *task_data, void *user_data, const char *err) char msg[PATH_MAX_LENGTH]; if (type_hash == CB_CORE_UPDATER_DOWNLOAD) event_command(EVENT_CMD_CORE_INFO_INIT); + else if (type_hash == CB_UPDATE_ASSETS) + event_command(EVENT_CMD_REINIT); + snprintf(msg, sizeof(msg), "%s extracted.", path_basename(dec->source_file)); rarch_main_msg_queue_push(msg, 1, 90, true); @@ -460,7 +463,7 @@ void cb_generic_download(void *task_data, void *user_data, const char *err) "Decompressing %s...", path_basename(output_path)); if (!rarch_task_push_decompress(output_path, dir_path, NULL, - cb_decompressed, (void*)(uintptr_t)CB_CORE_UPDATER_DOWNLOAD)) + cb_decompressed, (void*)(uintptr_t)transf->type_hash)) { rarch_main_msg_queue_pushf(1, 90, true, "Decompression of %s failed.", path_basename(output_path));