From e72cdd78d66f7d55c492c0ee3d9a8c83eac1f848 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 11 Mar 2021 19:17:06 +0100 Subject: [PATCH] menu_displaylist.c is never built into Salamander, so these ifdefs can go --- menu/menu_displaylist.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index b3a9406515..ad4661c89f 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -8980,8 +8980,8 @@ unsigned menu_displaylist_build_list( /* Returns true if selection pointer should be reset * to zero when viewing specified history playlist */ -#ifndef IS_SALAMANDER -static bool history_needs_navigation_clear(menu_handle_t *menu, playlist_t *playlist) +static bool history_needs_navigation_clear( + menu_handle_t *menu, playlist_t *playlist) { if (!menu) return false; @@ -8993,20 +8993,19 @@ static bool history_needs_navigation_clear(menu_handle_t *menu, playlist_t *play /* If content is not running, have to examine the * playlist... */ - if (!playlist) - return false; - - if (menu->rpl_entry_selection_ptr < playlist_size(playlist)) + if (playlist) { - const struct playlist_entry *entry = NULL; + if (menu->rpl_entry_selection_ptr < playlist_size(playlist)) + { + const struct playlist_entry *entry = NULL; - playlist_get_index(playlist, menu->rpl_entry_selection_ptr, &entry); - return !string_is_equal(menu->deferred_path, entry->path); + playlist_get_index(playlist, menu->rpl_entry_selection_ptr, &entry); + return !string_is_equal(menu->deferred_path, entry->path); + } } return false; } -#endif static unsigned menu_displaylist_build_shader_parameter( menu_displaylist_info_t *info, @@ -10562,11 +10561,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, info->need_sort = false; info->need_refresh = true; info->need_push = true; -#ifndef IS_SALAMANDER info->need_navigation_clear = history_needs_navigation_clear(menu, g_defaults.content_history); -#endif - break; case DISPLAYLIST_FAVORITES: { @@ -10640,10 +10636,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, info->need_sort = false; info->need_refresh = true; info->need_push = true; -#ifndef IS_SALAMANDER info->need_navigation_clear = history_needs_navigation_clear(menu, g_defaults.music_history); -#endif } break; case DISPLAYLIST_VIDEO_HISTORY: @@ -10689,7 +10683,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, info->need_sort = false; info->need_refresh = true; info->need_push = true; -#if !defined(IS_SALAMANDER) && (defined(HAVE_FFMPEG) || defined(HAVE_MPV)) +#if (defined(HAVE_FFMPEG) || defined(HAVE_MPV)) info->need_navigation_clear = history_needs_navigation_clear(menu, g_defaults.video_history); #endif @@ -12095,7 +12089,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, info->need_sort = false; info->need_refresh = true; info->need_push = true; -#if !defined(IS_SALAMANDER) && defined(HAVE_IMAGEVIEWER) +#if defined(HAVE_IMAGEVIEWER) info->need_navigation_clear = history_needs_navigation_clear(menu, g_defaults.image_history); #endif