diff --git a/file.c b/file.c index ce9dd815e4..e92ab19cfe 100644 --- a/file.c +++ b/file.c @@ -384,8 +384,8 @@ bool init_rom_file(void) { unsigned i; - g_extern.temporary_roms = string_list_new(); - if (!g_extern.temporary_roms) + g_extern.temporary_content = string_list_new(); + if (!g_extern.temporary_content) return false; const struct retro_subsystem_info *special = NULL; @@ -462,17 +462,17 @@ bool init_rom_file(void) if (ext && !strcasecmp(ext, "zip")) { - char temporary_rom[PATH_MAX]; - strlcpy(temporary_rom, content->elems[i].data, sizeof(temporary_rom)); - if (!zlib_extract_first_rom(temporary_rom, sizeof(temporary_rom), valid_ext, + char temporary_content[PATH_MAX]; + strlcpy(temporary_content, content->elems[i].data, sizeof(temporary_content)); + if (!zlib_extract_first_rom(temporary_content, sizeof(temporary_content), valid_ext, *g_settings.extraction_directory ? g_settings.extraction_directory : NULL)) { - RARCH_ERR("Failed to extract ROM from zipped file: %s.\n", temporary_rom); + RARCH_ERR("Failed to extract ROM from zipped file: %s.\n", temporary_content); string_list_free(content); return false; } - string_list_set(content, i, temporary_rom); - string_list_append(g_extern.temporary_roms, temporary_rom, attr); + string_list_set(content, i, temporary_content); + string_list_append(g_extern.temporary_content, temporary_content, attr); } } #endif diff --git a/general.h b/general.h index d958bf1073..db339a3fa6 100644 --- a/general.h +++ b/general.h @@ -390,7 +390,7 @@ struct global #endif bool force_fullscreen; - struct string_list *temporary_roms; + struct string_list *temporary_content; content_history_t *history; diff --git a/retroarch.c b/retroarch.c index 8bd5556102..60e2364852 100644 --- a/retroarch.c +++ b/retroarch.c @@ -3259,19 +3259,19 @@ void rarch_main_deinit(void) rarch_main_deinit_core(); - if (g_extern.temporary_roms) + if (g_extern.temporary_content) { unsigned i; - for (i = 0; i < g_extern.temporary_roms->size; i++) + for (i = 0; i < g_extern.temporary_content->size; i++) { - const char *path = g_extern.temporary_roms->elems[i].data; + const char *path = g_extern.temporary_content->elems[i].data; RARCH_LOG("Removing temporary content file: %s.\n", path); if (remove(path) < 0) RARCH_ERR("Failed to remove temporary file: %s.\n", path); } } - string_list_free(g_extern.temporary_roms); - g_extern.temporary_roms = NULL; + string_list_free(g_extern.temporary_content); + g_extern.temporary_content = NULL; string_list_free(g_extern.subsystem_fullpaths); string_list_free(g_extern.savefiles);