mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-20 19:40:39 +00:00
Move attr variable to init_content_file_set_attribs
This commit is contained in:
parent
73e97d119d
commit
7405535f03
30
content.c
30
content.c
@ -633,11 +633,12 @@ static bool init_content_file_extract(
|
||||
static bool init_content_file_set_attribs(
|
||||
struct string_list *content,
|
||||
rarch_system_info_t *system,
|
||||
const struct retro_subsystem_info *special,
|
||||
union string_list_elem_attr *attr)
|
||||
const struct retro_subsystem_info *special)
|
||||
{
|
||||
union string_list_elem_attr attr;
|
||||
global_t *global = global_get_ptr();
|
||||
attr->i = 0;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (*global->subsystem)
|
||||
{
|
||||
@ -645,37 +646,37 @@ static bool init_content_file_set_attribs(
|
||||
|
||||
for (i = 0; i < global->subsystem_fullpaths->size; i++)
|
||||
{
|
||||
attr->i = special->roms[i].block_extract;
|
||||
attr->i |= special->roms[i].need_fullpath << 1;
|
||||
attr->i |= special->roms[i].required << 2;
|
||||
attr.i = special->roms[i].block_extract;
|
||||
attr.i |= special->roms[i].need_fullpath << 1;
|
||||
attr.i |= special->roms[i].required << 2;
|
||||
|
||||
string_list_append(content,
|
||||
global->subsystem_fullpaths->elems[i].data, *attr);
|
||||
global->subsystem_fullpaths->elems[i].data, attr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
attr->i = system->info.block_extract;
|
||||
attr->i |= system->info.need_fullpath << 1;
|
||||
attr->i |= (!system->no_content) << 2;
|
||||
attr.i = system->info.block_extract;
|
||||
attr.i |= system->info.need_fullpath << 1;
|
||||
attr.i |= (!system->no_content) << 2;
|
||||
|
||||
if (global->inited.core.no_content
|
||||
&& settings->core.set_supports_no_game_enable)
|
||||
string_list_append(content, "", *attr);
|
||||
string_list_append(content, "", attr);
|
||||
else
|
||||
{
|
||||
char *fullpath = NULL;
|
||||
runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath);
|
||||
|
||||
string_list_append(content, fullpath, *attr);
|
||||
string_list_append(content, fullpath, attr);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
/* Try to extract all content we're going to load if appropriate. */
|
||||
if (!init_content_file_extract(content, system, special, attr))
|
||||
if (!init_content_file_extract(content, system, special, &attr))
|
||||
return false;
|
||||
#endif
|
||||
return true;
|
||||
@ -695,7 +696,6 @@ static bool init_content_file_set_attribs(
|
||||
bool init_content_file(void)
|
||||
{
|
||||
unsigned i;
|
||||
union string_list_elem_attr attr;
|
||||
struct retro_game_info *info = NULL;
|
||||
bool ret = false;
|
||||
struct string_list* additional_path_allocs = NULL;
|
||||
@ -717,7 +717,7 @@ bool init_content_file(void)
|
||||
if (!content)
|
||||
goto error;
|
||||
|
||||
if (!init_content_file_set_attribs(content, system, special, &attr))
|
||||
if (!init_content_file_set_attribs(content, system, special))
|
||||
goto error;
|
||||
|
||||
info = (struct retro_game_info*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user