Skip to content

Commit bdcf692

Browse files
committed
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.
1 parent 70f24be commit bdcf692

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

menu/drivers/ozone.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5283,27 +5283,27 @@ static void ozone_refresh_system_tabs_list(ozone_handle_t * ozone)
52835283
{
52845284
if (settings->bools.menu_content_show_favorites)
52855285
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
5286-
if (settings->bools.menu_content_show_history)
5286+
if (settings->bools.menu_content_show_history && settings->bools.history_list_enable)
52875287
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
52885288
}
52895289
else
52905290
{
5291-
if (settings->bools.menu_content_show_history)
5291+
if (settings->bools.menu_content_show_history && settings->bools.history_list_enable)
52925292
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
52935293
if (settings->bools.menu_content_show_favorites)
52945294
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
52955295
}
52965296

52975297
#ifdef HAVE_IMAGEVIEWER
5298-
if (settings->bools.menu_content_show_images)
5298+
if (settings->bools.menu_content_show_images && settings->bools.history_list_enable)
52995299
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_IMAGES;
53005300
#endif
53015301

5302-
if (settings->bools.menu_content_show_music)
5302+
if (settings->bools.menu_content_show_music && settings->bools.history_list_enable)
53035303
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_MUSIC;
53045304

53055305
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
5306-
if (settings->bools.menu_content_show_video)
5306+
if (settings->bools.menu_content_show_video && settings->bools.history_list_enable)
53075307
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_VIDEO;
53085308
#endif
53095309

menu/menu_setting.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9322,6 +9322,7 @@ static void general_write_handler(rarch_setting_t *setting)
93229322
case MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLIST_TABS:
93239323
case MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE:
93249324
case MENU_ENUM_LABEL_CONTENT_SHOW_CONTENTLESS_CORES:
9325+
case MENU_ENUM_LABEL_HISTORY_LIST_ENABLE:
93259326
{
93269327
struct menu_state *menu_st = menu_state_get_ptr();
93279328
if (menu_st->driver_ctx->environ_cb)

0 commit comments

Comments
 (0)