(task_content) Some simplifications
This commit is contained in:
parent
5771a7a71d
commit
81d22c63de
|
@ -848,8 +848,9 @@ static void content_file_init_set_attribs(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool contentless = false;
|
bool contentless = false;
|
||||||
bool is_inited = false;
|
bool is_inited = false;
|
||||||
|
bool content_path_is_empty = path_is_empty(RARCH_PATH_CONTENT);
|
||||||
|
|
||||||
content_get_status(&contentless, &is_inited);
|
content_get_status(&contentless, &is_inited);
|
||||||
|
|
||||||
|
@ -857,15 +858,12 @@ static void content_file_init_set_attribs(
|
||||||
attr->i |= content_ctx->need_fullpath << 1;
|
attr->i |= content_ctx->need_fullpath << 1;
|
||||||
attr->i |= (!contentless) << 2;
|
attr->i |= (!contentless) << 2;
|
||||||
|
|
||||||
if (path_is_empty(RARCH_PATH_CONTENT)
|
if (content_path_is_empty
|
||||||
&& contentless
|
&& contentless
|
||||||
&& content_ctx->set_supports_no_game_enable)
|
&& content_ctx->set_supports_no_game_enable)
|
||||||
string_list_append(content, "", *attr);
|
string_list_append(content, "", *attr);
|
||||||
else
|
else if (!content_path_is_empty)
|
||||||
{
|
string_list_append(content, path_get(RARCH_PATH_CONTENT), *attr);
|
||||||
if (!path_is_empty(RARCH_PATH_CONTENT))
|
|
||||||
string_list_append(content, path_get(RARCH_PATH_CONTENT), *attr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -884,13 +882,12 @@ static bool content_file_init(
|
||||||
{
|
{
|
||||||
union string_list_elem_attr attr;
|
union string_list_elem_attr attr;
|
||||||
struct retro_game_info *info = NULL;
|
struct retro_game_info *info = NULL;
|
||||||
bool ret =
|
bool subsystem_path_is_empty = path_is_empty(RARCH_PATH_SUBSYSTEM);
|
||||||
path_is_empty(RARCH_PATH_SUBSYSTEM)
|
bool ret = subsystem_path_is_empty;
|
||||||
? true : false;
|
|
||||||
const struct retro_subsystem_info *special =
|
const struct retro_subsystem_info *special =
|
||||||
path_is_empty(RARCH_PATH_SUBSYSTEM)
|
subsystem_path_is_empty
|
||||||
? NULL : content_file_init_subsystem(content_ctx->subsystem.data,
|
? NULL : content_file_init_subsystem(content_ctx->subsystem.data,
|
||||||
content_ctx->subsystem.size, error_string, &ret);
|
content_ctx->subsystem.size, error_string, &ret);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue