mirror of https://github.com/OpenRCT2/OpenRCT2.git
Displaying full track filename excluding the real extension
This commit is contained in:
parent
63184052be
commit
5ca371c5c5
|
@ -3147,6 +3147,7 @@ void window_track_list_format_name(utf8 *dst, const utf8 *src, int colour, bool
|
|||
{
|
||||
const utf8 *ch;
|
||||
int codepoint;
|
||||
char *lastDot = strrchr(src, '.');
|
||||
|
||||
if (colour != 0) {
|
||||
dst = utf8_write_codepoint(dst, colour);
|
||||
|
@ -3155,8 +3156,8 @@ void window_track_list_format_name(utf8 *dst, const utf8 *src, int colour, bool
|
|||
if (quotes) dst = utf8_write_codepoint(dst, FORMAT_OPENQUOTES);
|
||||
|
||||
ch = src;
|
||||
while ((codepoint = utf8_get_next(ch, &ch)) != 0) {
|
||||
if (codepoint == '.') break;
|
||||
while (lastDot > ch) {
|
||||
codepoint = utf8_get_next(ch, &ch);
|
||||
dst = utf8_write_codepoint(dst, codepoint);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue