mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Simplify function in task_content
This commit is contained in:
parent
5d59871c05
commit
fc3cf2ebb6
@ -580,9 +580,15 @@ static bool load_content(
|
|||||||
|
|
||||||
static const struct retro_subsystem_info *init_content_file_subsystem(bool *ret)
|
static const struct retro_subsystem_info *init_content_file_subsystem(bool *ret)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
const struct retro_subsystem_info *special = NULL;
|
const struct retro_subsystem_info *special = NULL;
|
||||||
rarch_system_info_t *system = NULL;
|
rarch_system_info_t *system = NULL;
|
||||||
|
global_t *global = global_get_ptr();
|
||||||
|
|
||||||
|
if (global && string_is_empty(global->subsystem))
|
||||||
|
{
|
||||||
|
*ret = true;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||||
|
|
||||||
@ -703,20 +709,10 @@ static bool content_file_init(struct string_list *temporary_content)
|
|||||||
struct retro_game_info *info = NULL;
|
struct retro_game_info *info = NULL;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
struct string_list* additional_path_allocs = NULL;
|
struct string_list* additional_path_allocs = NULL;
|
||||||
struct string_list *content = NULL;
|
const struct retro_subsystem_info *special = init_content_file_subsystem(&ret);
|
||||||
const struct retro_subsystem_info *special = NULL;
|
struct string_list *content = string_list_new();
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
|
|
||||||
if (global && !string_is_empty(global->subsystem))
|
if (!ret || !content)
|
||||||
{
|
|
||||||
special = init_content_file_subsystem(&ret);
|
|
||||||
if (!ret)
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
content = string_list_new();
|
|
||||||
|
|
||||||
if (!content)
|
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!init_content_file_set_attribs(temporary_content,
|
if (!init_content_file_set_attribs(temporary_content,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user