mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Cut down on string_is_equals for history lists
This commit is contained in:
parent
c31bfb4dc8
commit
9364deb539
@ -1886,10 +1886,7 @@ static void menu_displaylist_set_new_playlist(
|
|||||||
/* Get proper playlist capacity */
|
/* Get proper playlist capacity */
|
||||||
if (!string_is_empty(playlist_file_name))
|
if (!string_is_empty(playlist_file_name))
|
||||||
{
|
{
|
||||||
if (string_is_equal(playlist_file_name, file_path_str(FILE_PATH_CONTENT_HISTORY)) ||
|
if (string_ends_with(path, "_history.lpl"))
|
||||||
string_is_equal(playlist_file_name, file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY)) ||
|
|
||||||
string_is_equal(playlist_file_name, file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY)) ||
|
|
||||||
string_is_equal(playlist_file_name, file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY)))
|
|
||||||
playlist_size = content_history_size;
|
playlist_size = content_history_size;
|
||||||
else if (string_is_equal(playlist_file_name, file_path_str(FILE_PATH_CONTENT_FAVORITES)))
|
else if (string_is_equal(playlist_file_name, file_path_str(FILE_PATH_CONTENT_FAVORITES)))
|
||||||
if (content_favorites_size >= 0)
|
if (content_favorites_size >= 0)
|
||||||
@ -2704,11 +2701,10 @@ static unsigned menu_displaylist_parse_playlists(
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Ignore history/favourites */
|
/* Ignore history/favourites */
|
||||||
if (string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_HISTORY)) ||
|
if (
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY)) ||
|
string_ends_with(path, "_history.lpl")
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY)) ||
|
|| string_is_equal(playlist_file,
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY)) ||
|
file_path_str(FILE_PATH_CONTENT_FAVORITES)))
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_FAVORITES)))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
file_type = FILE_TYPE_PLAYLIST_COLLECTION;
|
file_type = FILE_TYPE_PLAYLIST_COLLECTION;
|
||||||
@ -2974,11 +2970,10 @@ static unsigned menu_displaylist_parse_playlist_manager_list(
|
|||||||
/* Ignore history/favourites
|
/* Ignore history/favourites
|
||||||
* > content_history + favorites are handled separately
|
* > content_history + favorites are handled separately
|
||||||
* > music/video/image_history are ignored */
|
* > music/video/image_history are ignored */
|
||||||
if (string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_HISTORY)) ||
|
if (
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY)) ||
|
string_ends_with(path, "_history.lpl")
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY)) ||
|
|| string_is_equal(playlist_file,
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY)) ||
|
file_path_str(FILE_PATH_CONTENT_FAVORITES)))
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_FAVORITES)))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
menu_entries_append_enum(info->list,
|
menu_entries_append_enum(info->list,
|
||||||
@ -3054,10 +3049,7 @@ static bool menu_displaylist_parse_playlist_manager_settings(
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Check whether this is a content history playlist */
|
/* Check whether this is a content history playlist */
|
||||||
is_content_history = string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_HISTORY)) ||
|
is_content_history = string_ends_with(playlist_path, "_history.lpl");
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY)) ||
|
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY)) ||
|
|
||||||
string_is_equal(playlist_file, file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY));
|
|
||||||
|
|
||||||
/* Default core association
|
/* Default core association
|
||||||
* > This is only shown for collection playlists
|
* > This is only shown for collection playlists
|
||||||
|
12
playlist.c
12
playlist.c
@ -2753,12 +2753,12 @@ void playlist_get_db_name(playlist_t *playlist, size_t idx,
|
|||||||
|
|
||||||
/* Only use file basename if this is a 'collection' playlist
|
/* Only use file basename if this is a 'collection' playlist
|
||||||
* (i.e. ignore history/favourites) */
|
* (i.e. ignore history/favourites) */
|
||||||
if (!string_is_empty(conf_path_basename) &&
|
if (
|
||||||
!string_is_equal(conf_path_basename, file_path_str(FILE_PATH_CONTENT_FAVORITES)) &&
|
!string_is_empty(conf_path_basename)
|
||||||
!string_is_equal(conf_path_basename, file_path_str(FILE_PATH_CONTENT_HISTORY)) &&
|
&& !string_ends_with(playlist->conf_path, "_history.lpl")
|
||||||
!string_is_equal(conf_path_basename, file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY)) &&
|
&& !string_is_equal(conf_path_basename,
|
||||||
!string_is_equal(conf_path_basename, file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY)) &&
|
file_path_str(FILE_PATH_CONTENT_FAVORITES))
|
||||||
!string_is_equal(conf_path_basename, file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY)))
|
)
|
||||||
*db_name = conf_path_basename;
|
*db_name = conf_path_basename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user