Cleanup unused menu_is_nonrunning_quickmenu

This commit is contained in:
libretroadmin 2024-12-22 05:07:30 +01:00
parent 6b8466f87a
commit e01ef9e1de
5 changed files with 42 additions and 23 deletions

View File

@ -4144,7 +4144,7 @@ static void ozone_update_content_metadata(ozone_handle_t *ozone)
if ( (playlist
&& ( (ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|| ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && !menu_is_running_quick_menu())))
|| ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && !menu_is_running_quick_menu())))
|| ( (ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST) && ozone->depth == 4))
{
size_t _len;
@ -8067,7 +8067,7 @@ static enum menu_action ozone_parse_menu_entry_action(
{
case MENU_ACTION_START:
ozone->flags &= ~OZONE_FLAG_CURSOR_MODE;
if ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
if ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
|| ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && menu_is_running_quick_menu()))
break;
@ -8155,9 +8155,9 @@ static enum menu_action ozone_parse_menu_entry_action(
ozone->flags2 |= OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS;
new_action = MENU_ACTION_NOOP;
}
else if ( (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)
&& ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT) ||
((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && menu_is_running_quick_menu())))
else if ( (ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS)
&& ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
|| ((ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU) && menu_is_running_quick_menu())))
{
ozone_hide_fullscreen_thumbnails(ozone, true);
ozone->flags2 &= ~OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS;
@ -12151,8 +12151,18 @@ static void ozone_populate_entries(
#if defined(HAVE_LIBRETRODB)
if (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
{
menu_entry_t entry;
MENU_ENTRY_INITIALIZE(entry);
entry.flags |= MENU_ENTRY_FLAG_LABEL_ENABLED
| MENU_ENTRY_FLAG_RICH_LABEL_ENABLED;
menu_entry_get(&entry, 0, 0, NULL, true);
/* Quick Menu under Explore list must also be Quick Menu */
if (menu_is_nonrunning_quick_menu() || menu_is_running_quick_menu())
if ( string_is_equal(entry.label, "collection")
|| (string_is_equal(entry.label, "resume_content")
|| string_is_equal(entry.label, "state_slot"))
)
ozone->flags2 |= OZONE_FLAG2_IS_QUICK_MENU;
if (!menu_explore_is_content_list() || (ozone->flags2 & OZONE_FLAG2_IS_QUICK_MENU))
ozone->flags &= ~OZONE_FLAG_IS_EXPLORE_LIST;

View File

@ -7328,7 +7328,18 @@ static void rgui_populate_entries(
/* Quick Menu under Explore list must also be Quick Menu */
if (rgui->flags & RGUI_FLAG_IS_EXPLORE_LIST)
{
if (menu_is_nonrunning_quick_menu() || menu_is_running_quick_menu())
menu_entry_t entry;
MENU_ENTRY_INITIALIZE(entry);
entry.flags |= MENU_ENTRY_FLAG_LABEL_ENABLED
| MENU_ENTRY_FLAG_RICH_LABEL_ENABLED;
menu_entry_get(&entry, 0, 0, NULL, true);
/* Quick Menu under Explore list must also be Quick Menu */
if ( string_is_equal(entry.label, "collection")
|| (string_is_equal(entry.label, "resume_content")
|| string_is_equal(entry.label, "state_slot"))
)
rgui->flags |= RGUI_FLAG_IS_QUICK_MENU;
if (rgui->flags & RGUI_FLAG_IS_QUICK_MENU)
rgui->flags &= ~RGUI_FLAG_IS_EXPLORE_LIST;

View File

@ -2924,8 +2924,21 @@ static void xmb_populate_entries(void *data,
#if defined(HAVE_LIBRETRODB)
if (xmb->is_explore_list)
{
menu_entry_t entry;
MENU_ENTRY_INITIALIZE(entry);
entry.flags |= MENU_ENTRY_FLAG_LABEL_ENABLED
| MENU_ENTRY_FLAG_RICH_LABEL_ENABLED;
menu_entry_get(&entry, 0, 0, NULL, true);
/* Quick Menu under Explore list must also be Quick Menu */
xmb->is_quick_menu |= menu_is_nonrunning_quick_menu() || menu_is_running_quick_menu();
bool is_quick_menu =
( string_is_equal(entry.label, "collection")
|| (string_is_equal(entry.label, "resume_content")
|| string_is_equal(entry.label, "state_slot"))
);
/* Quick Menu under Explore list must also be Quick Menu */
xmb->is_quick_menu |= is_quick_menu;
if (!menu_explore_is_content_list() || xmb->is_quick_menu)
xmb->is_explore_list = false;
@ -3023,9 +3036,7 @@ static void xmb_populate_entries(void *data,
xmb->fullscreen_thumbnails_available = true;
}
else if (xmb->is_quick_menu)
{
xmb->fullscreen_thumbnails_available = !menu_is_running_quick_menu();
}
else if (xmb->is_explore_list)
{
xmb_set_thumbnail_content(xmb, "");

View File

@ -8098,18 +8098,6 @@ bool menu_is_running_quick_menu(void)
|| string_is_equal(entry.label, "state_slot");
}
bool menu_is_nonrunning_quick_menu(void)
{
menu_entry_t entry;
MENU_ENTRY_INITIALIZE(entry);
entry.flags |= MENU_ENTRY_FLAG_LABEL_ENABLED
| MENU_ENTRY_FLAG_RICH_LABEL_ENABLED;
menu_entry_get(&entry, 0, 0, NULL, true);
return string_is_equal(entry.label, "collection");
}
#ifdef HAVE_RUNAHEAD
/**
* menu_update_runahead_mode

View File

@ -742,7 +742,6 @@ size_t menu_update_fullscreen_thumbnail_label(
bool is_quick_menu, const char *title);
bool menu_is_running_quick_menu(void);
bool menu_is_nonrunning_quick_menu(void);
bool menu_input_key_bind_set_mode(
enum menu_input_binds_ctl_state state, void *data);