Rename g_extern.temporary_roms to g_extern.temporary_content

This commit is contained in:
twinaphex 2014-07-28 19:49:07 +02:00
parent 6485353884
commit f9b7431289
3 changed files with 14 additions and 14 deletions

16
file.c
View File

@ -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

View File

@ -390,7 +390,7 @@ struct global
#endif
bool force_fullscreen;
struct string_list *temporary_roms;
struct string_list *temporary_content;
content_history_t *history;

View File

@ -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);