This should hide the 'black square' bug

This commit is contained in:
twinaphex 2016-07-23 09:48:29 +02:00
parent 7ef4f5a717
commit 3945b79161
3 changed files with 11 additions and 0 deletions

View File

@ -65,6 +65,7 @@ enum file_path_enum
FILE_PATH_REMAP_EXTENSION,
FILE_PATH_CHT_EXTENSION,
FILE_PATH_LPL_EXTENSION,
FILE_PATH_LPL_EXTENSION_NO_DOT,
FILE_PATH_RDB_EXTENSION,
FILE_PATH_BSV_EXTENSION,
FILE_PATH_AUTO_EXTENSION,

View File

@ -67,6 +67,8 @@ const char *file_path_str(enum file_path_enum enum_idx)
return ".state";
case FILE_PATH_LPL_EXTENSION:
return ".lpl";
case FILE_PATH_LPL_EXTENSION_NO_DOT:
return "lpl";
case FILE_PATH_PNG_EXTENSION:
return ".png";
case FILE_PATH_UPS_EXTENSION:

View File

@ -3205,6 +3205,10 @@ static int menu_displaylist_parse_playlists(
if (file_type == FILE_TYPE_DIRECTORY)
continue;
if (!string_list_find_elem_prefix(str_list, ".",
file_path_str(FILE_PATH_LPL_EXTENSION_NO_DOT)))
continue;
file_type = FILE_TYPE_PLAYLIST_COLLECTION;
/* Need to preserve slash first time. */
@ -3222,7 +3226,11 @@ static int menu_displaylist_parse_playlists(
string_list_free(str_list);
if (items_found == 0)
{
if (horizontal)
return 0;
goto no_playlists;
}
return 0;