mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
(task_database.c) Call snprintf just once
This commit is contained in:
parent
9102ae125b
commit
62de3336f5
1 changed files with 3 additions and 8 deletions
|
@ -45,12 +45,6 @@ static int database_info_iterate_playlist(
|
||||||
if (!strcmp(path_get_extension(name), "zip"))
|
if (!strcmp(path_get_extension(name), "zip"))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ZLIB
|
#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);
|
|
||||||
|
|
||||||
|
|
||||||
if (!zlib_parse_file(name, NULL, zlib_compare_crc32,
|
if (!zlib_parse_file(name, NULL, zlib_compare_crc32,
|
||||||
(void*)parent_dir))
|
(void*)parent_dir))
|
||||||
RARCH_LOG("Could not process ZIP file.\n");
|
RARCH_LOG("Could not process ZIP file.\n");
|
||||||
|
@ -68,8 +62,6 @@ static int database_info_iterate_playlist(
|
||||||
if (read_from != 1 || ret <= 0)
|
if (read_from != 1 || ret <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%zu/%zu: Scanning %s...\n",
|
|
||||||
db->list_ptr, db->list->size, name);
|
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
crc = zlib_crc32_calculate(ret_buf, ret);
|
crc = zlib_crc32_calculate(ret_buf, ret);
|
||||||
|
@ -81,6 +73,9 @@ static int database_info_iterate_playlist(
|
||||||
free(ret_buf);
|
free(ret_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snprintf(msg, sizeof(msg), "%zu/%zu: Scanning %s...\n",
|
||||||
|
db->list_ptr, db->list->size, name);
|
||||||
|
|
||||||
if (msg[0] != '\0')
|
if (msg[0] != '\0')
|
||||||
rarch_main_msg_queue_push(msg, 1, 180, true);
|
rarch_main_msg_queue_push(msg, 1, 180, true);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue