Attempt at buildfix and optimization

This commit is contained in:
Ryunam 2019-08-10 15:26:02 +02:00
parent af42417734
commit 559e68d5a8

View File

@ -573,6 +573,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
char title_noext[255];
char *chr;
bool hyphen_found;
settings_t *settings = config_get_ptr();
size_t list_size = ozone_list_get_size(ozone, MENU_LIST_HORIZONTAL);
@ -686,9 +687,8 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
and the subsequent space */
chr = title_noext;
hyphen_found = false;
settings_t *settings = config_get_ptr();
while (true)
while (settings->bools.ozone_truncate_playlist_name)
{
/* Check for "- " */
if (*chr == '-' && *(chr + 1) == ' ')
@ -702,7 +702,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
chr++;
}
if (hyphen_found && settings->bools.ozone_truncate_playlist_name)
if (hyphen_found)
chr += 2;
else
chr = title_noext;