mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 10:20:41 +00:00
(menu_cbs_deferred_push.c) Cleanups
This commit is contained in:
parent
dde7c28730
commit
0314921434
@ -430,16 +430,11 @@ static int general_push(menu_displaylist_info_t *info,
|
|||||||
{
|
{
|
||||||
case PUSH_ARCHIVE_OPEN:
|
case PUSH_ARCHIVE_OPEN:
|
||||||
{
|
{
|
||||||
struct retro_system_info *system = runloop_get_libretro_system_info();
|
struct retro_system_info *system =
|
||||||
if (system && system->valid_extensions)
|
runloop_get_libretro_system_info();
|
||||||
|
if (system)
|
||||||
{
|
{
|
||||||
if (*system->valid_extensions)
|
if (!string_is_empty(system->valid_extensions))
|
||||||
strlcpy(newstring2, system->valid_extensions,
|
|
||||||
PATH_MAX_LENGTH * sizeof(char));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (system)
|
|
||||||
strlcpy(newstring2, system->valid_extensions,
|
strlcpy(newstring2, system->valid_extensions,
|
||||||
PATH_MAX_LENGTH * sizeof(char));
|
PATH_MAX_LENGTH * sizeof(char));
|
||||||
}
|
}
|
||||||
@ -449,21 +444,14 @@ static int general_push(menu_displaylist_info_t *info,
|
|||||||
{
|
{
|
||||||
bool new_exts_allocated = false;
|
bool new_exts_allocated = false;
|
||||||
char *new_exts = NULL;
|
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)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
struct retro_system_info *system =
|
||||||
|
runloop_get_libretro_system_info();
|
||||||
if (system && !string_is_empty(system->valid_extensions))
|
if (system && !string_is_empty(system->valid_extensions))
|
||||||
{
|
{
|
||||||
new_exts = strdup(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';
|
newstring[0] = '\0';
|
||||||
attr.i = 0;
|
attr.i = 0;
|
||||||
|
|
||||||
if (system && system->valid_extensions)
|
if (system)
|
||||||
{
|
{
|
||||||
if (!string_is_empty(system->valid_extensions))
|
if (!string_is_empty(system->valid_extensions))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user