mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 17:28:49 -10:00
ozone+menu_setting: Hide History/Images/Music/Video tabs when history is disabled
The ozone sidebar exposes History, Images, Music, and Video tabs whose content is populated exclusively from the playlists managed by CMD_EVENT_HISTORY_INIT. When history_list_enable is OFF those playlists are never initialized, so the tabs become permanent dead ends - selecting History, for example, just shows "No History Available" forever. Gate the four tabs in ozone_refresh_system_tabs_list on history_list_enable in addition to the existing menu_content_show_* flags. Favorites is unaffected (independent setting). Also wire MENU_ENUM_LABEL_HISTORY_LIST_ENABLE into the MENU_ENVIRON_RESET_HORIZONTAL_LIST dispatch in general_write_handler so toggling the setting refreshes the tab list immediately rather than requiring a restart, matching the behaviour of the neighbouring menu_content_show_* toggles.
This commit is contained in:
1 parent
70f24be5a5
commit
bdcf692d24
2 files changed
+6
-5
No files matched your search
@@ -5283,27 +5283,27 @@ static void ozone_refresh_system_tabs_list(ozone_handle_t * ozone)
|
||||
{
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (settings->bools.menu_content_show_history && settings->bools.history_list_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings->bools.menu_content_show_history)
|
||||
if (settings->bools.menu_content_show_history && settings->bools.history_list_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
|
||||
if (settings->bools.menu_content_show_favorites)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
|
||||
}
|
||||
|
||||
#ifdef HAVE_IMAGEVIEWER
|
||||
if (settings->bools.menu_content_show_images)
|
||||
if (settings->bools.menu_content_show_images && settings->bools.history_list_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_IMAGES;
|
||||
#endif
|
||||
|
||||
if (settings->bools.menu_content_show_music)
|
||||
if (settings->bools.menu_content_show_music && settings->bools.history_list_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_MUSIC;
|
||||
|
||||
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
|
||||
if (settings->bools.menu_content_show_video)
|
||||
if (settings->bools.menu_content_show_video && settings->bools.history_list_enable)
|
||||
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_VIDEO;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9322,6 +9322,7 @@ static void general_write_handler(rarch_setting_t *setting)
|
||||
case MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLIST_TABS:
|
||||
case MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE:
|
||||
case MENU_ENUM_LABEL_CONTENT_SHOW_CONTENTLESS_CORES:
|
||||
case MENU_ENUM_LABEL_HISTORY_LIST_ENABLE:
|
||||
{
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
if (menu_st->driver_ctx->environ_cb)
|
||||
|
||||
Reference in new issue
Block a user