mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Submenu system is now properly hidden
This commit is contained in:
parent
48af253a06
commit
81972149fc
@ -6678,8 +6678,11 @@ static int materialui_list_push(void *data, void *userdata,
|
||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||
menu_displaylist_setting(&entry);
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
if (menu_displaylist_has_subsystems())
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->bools.menu_content_show_history)
|
||||
|
@ -834,8 +834,11 @@ static int ozone_list_push(void *data, void *userdata,
|
||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||
menu_displaylist_setting(&entry);
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
if (menu_displaylist_has_subsystems())
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->bools.menu_show_load_disc)
|
||||
|
@ -4211,61 +4211,13 @@ static int stripes_list_push(void *data, void *userdata,
|
||||
|
||||
if (settings->bools.menu_show_load_content)
|
||||
{
|
||||
const struct retro_subsystem_info* subsystem = NULL;
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||
menu_displaylist_setting(&entry);
|
||||
|
||||
subsystem = system->subsystem.data;
|
||||
|
||||
if (subsystem)
|
||||
if (menu_displaylist_has_subsystems())
|
||||
{
|
||||
for (i = 0; i < system->subsystem.size; i++, subsystem++)
|
||||
{
|
||||
char s[PATH_MAX_LENGTH];
|
||||
if (content_get_subsystem() == i)
|
||||
{
|
||||
if (content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Load %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_ADD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD + i, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Start %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_LOAD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_LOAD,
|
||||
MENU_SETTINGS_SUBSYSTEM_LOAD, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(s, sizeof(s),
|
||||
"Load %s %s",
|
||||
subsystem->desc,
|
||||
i == content_get_subsystem()
|
||||
? "\u2605" : " ");
|
||||
menu_entries_append_enum(info->list,
|
||||
s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SUBSYSTEM_ADD),
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_ADD,
|
||||
MENU_SETTINGS_SUBSYSTEM_ADD + i, 0, 0);
|
||||
}
|
||||
}
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6181,8 +6181,11 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
entry.enum_idx = MENU_ENUM_LABEL_LOAD_CONTENT_LIST;
|
||||
menu_displaylist_setting(&entry);
|
||||
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
if (menu_displaylist_has_subsystems())
|
||||
{
|
||||
entry.enum_idx = MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS;
|
||||
menu_displaylist_setting(&entry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -7019,7 +7019,7 @@ static unsigned menu_displaylist_populate_subsystem(
|
||||
* character fallback) */
|
||||
snprintf(star_char, sizeof(star_char), "%s", is_rgui ? "*" : utf8_star_char);
|
||||
|
||||
if (subsystem && subsystem_current_count > 0)
|
||||
if (menu_displaylist_has_subsystems())
|
||||
{
|
||||
for (i = 0; i < subsystem_current_count; i++, subsystem++)
|
||||
{
|
||||
@ -7277,6 +7277,19 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
|
||||
return count;
|
||||
}
|
||||
|
||||
bool menu_displaylist_has_subsystems(void)
|
||||
{
|
||||
const struct retro_subsystem_info* subsystem = subsystem_data;
|
||||
rarch_system_info_t *sys_info =
|
||||
runloop_get_system_info();
|
||||
/* Core not loaded completely, use the data we
|
||||
* peeked on load core */
|
||||
/* Core fully loaded, use the subsystem data */
|
||||
if (sys_info && sys_info->subsystem.data)
|
||||
subsystem = sys_info->subsystem.data;
|
||||
return (subsystem && subsystem_current_count > 0);
|
||||
}
|
||||
|
||||
bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
menu_displaylist_info_t *info)
|
||||
{
|
||||
@ -9541,11 +9554,13 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
|
||||
/* Core fully loaded, use the subsystem data */
|
||||
if (sys_info && sys_info->subsystem.data)
|
||||
subsystem = sys_info->subsystem.data;
|
||||
|
||||
menu_displaylist_populate_subsystem(subsystem, info->list);
|
||||
if (menu_displaylist_has_subsystems())
|
||||
{
|
||||
if (menu_displaylist_parse_settings_enum(info->list,
|
||||
MENU_ENUM_LABEL_SUBSYSTEM_SETTINGS,
|
||||
PARSE_ACTION, false) == 0)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->bools.menu_content_show_history)
|
||||
|
@ -306,6 +306,8 @@ bool menu_displaylist_setting(menu_displaylist_ctx_parse_entry_t *entry);
|
||||
unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list);
|
||||
#endif
|
||||
|
||||
bool menu_displaylist_has_subsystems(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user