mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
ozone: don't break playlists without a hyphen in their name
This commit is contained in:
parent
6f631309cd
commit
1abab059f9
@ -1692,14 +1692,26 @@ static void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
|||||||
/* Format : "Vendor - Console"
|
/* Format : "Vendor - Console"
|
||||||
Remove everything before the hyphen
|
Remove everything before the hyphen
|
||||||
and the subsequent space */
|
and the subsequent space */
|
||||||
char *chr = title_noext;
|
char *chr = title_noext;
|
||||||
|
bool hyphen_found = false;
|
||||||
|
|
||||||
while (*chr != '-' && *chr != '\0')
|
while (true)
|
||||||
{
|
{
|
||||||
|
if (*chr == '-')
|
||||||
|
{
|
||||||
|
hyphen_found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (*chr == '\0')
|
||||||
|
break;
|
||||||
|
|
||||||
chr++;
|
chr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
chr += 2;
|
if (hyphen_found)
|
||||||
|
chr += 2;
|
||||||
|
else
|
||||||
|
chr = title_noext;
|
||||||
|
|
||||||
node->console_name = strdup(chr);
|
node->console_name = strdup(chr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user