From 938edba8b39e59b668eab39ab85da050723d1f0c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 23 May 2015 21:07:45 +0200 Subject: [PATCH] Add 'Scanning' message to ZIP file --- tasks/task_database.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/task_database.c b/tasks/task_database.c index cb05568bb7..4ad366e108 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -38,6 +38,7 @@ static int database_info_iterate_playlist( database_info_handle_t *db, const char *name) { char parent_dir[PATH_MAX_LENGTH]; + char msg[PATH_MAX_LENGTH]; path_parent_dir(parent_dir); @@ -46,6 +47,11 @@ static int database_info_iterate_playlist( #ifdef HAVE_ZLIB RARCH_LOG("[ZIP]: name: %s\n", name); + snprintf(msg, sizeof(msg), "%zu/%zu: Scanning %s...\n", + db->list_ptr, db->list->size, name); + + rarch_main_msg_queue_push(msg, 1, 180, true); + if (!zlib_parse_file(name, NULL, zlib_compare_crc32, (void*)parent_dir)) RARCH_LOG("Could not process ZIP file.\n"); @@ -53,7 +59,6 @@ static int database_info_iterate_playlist( } else { - char msg[PATH_MAX_LENGTH]; ssize_t ret; uint32_t crc, target_crc = 0; uint8_t *ret_buf = NULL;