(menu_cbs_deferred_push.c) Cleanups

This commit is contained in:
twinaphex 2019-09-23 04:31:12 +02:00
parent dde7c28730
commit 0314921434

View File

@ -430,16 +430,11 @@ static int general_push(menu_displaylist_info_t *info,
{
case PUSH_ARCHIVE_OPEN:
{
struct retro_system_info *system = runloop_get_libretro_system_info();
if (system && system->valid_extensions)
struct retro_system_info *system =
runloop_get_libretro_system_info();
if (system)
{
if (*system->valid_extensions)
strlcpy(newstring2, system->valid_extensions,
PATH_MAX_LENGTH * sizeof(char));
}
else
{
if (system)
if (!string_is_empty(system->valid_extensions))
strlcpy(newstring2, system->valid_extensions,
PATH_MAX_LENGTH * sizeof(char));
}
@ -449,21 +444,14 @@ static int general_push(menu_displaylist_info_t *info,
{
bool new_exts_allocated = false;
char *new_exts = NULL;
struct retro_system_info *system = runloop_get_libretro_system_info();
if (menu_setting_get_browser_selection_type(info->setting) == ST_DIR)
{
}
else if (system && system->valid_extensions)
{
if (*system->valid_extensions)
{
new_exts = strdup(system->valid_extensions);
new_exts_allocated = true;
}
}
else
{
struct retro_system_info *system =
runloop_get_libretro_system_info();
if (system && !string_is_empty(system->valid_extensions))
{
new_exts = strdup(system->valid_extensions);
@ -515,7 +503,7 @@ static int general_push(menu_displaylist_info_t *info,
newstring[0] = '\0';
attr.i = 0;
if (system && system->valid_extensions)
if (system)
{
if (!string_is_empty(system->valid_extensions))
{