From 2f2447cb3199c33c6f7ab0397b32001474d2d233 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 12 Feb 2003 20:21:03 +0000 Subject: [PATCH] don't subst stuff that already has translits --- stepmania/src/TitleSubstitution.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stepmania/src/TitleSubstitution.cpp b/stepmania/src/TitleSubstitution.cpp index 03fba05dea..a2dd62c2d6 100644 --- a/stepmania/src/TitleSubstitution.cpp +++ b/stepmania/src/TitleSubstitution.cpp @@ -46,20 +46,21 @@ void TitleSubst::Subst(CString &title, CString &subtitle, CString &artist, if(!ttab[i]->Matches(title, subtitle, artist)) continue; - /* The song matches. Replace whichever strings aren't empty: */ - if(!ttab[i]->TitleTo.empty()) + /* The song matches. Replace whichever strings aren't empty. + * Don't replace any that already have a transliteration set. */ + if(!ttab[i]->TitleTo.empty() && ttitle.empty()) { if(ttab[i]->translit) ttitle = title; title = ttab[i]->TitleTo; FontCharAliases::ReplaceMarkers( title ); } - if(!ttab[i]->SubTo.empty()) + if(!ttab[i]->SubTo.empty() && tsubtitle.empty()) { if(ttab[i]->translit) tsubtitle = subtitle; subtitle = ttab[i]->SubTo; FontCharAliases::ReplaceMarkers( subtitle ); } - if(!ttab[i]->ArtistTo.empty()) + if(!ttab[i]->ArtistTo.empty() && tartist.empty()) { if(ttab[i]->translit) tartist = artist; artist = ttab[i]->ArtistTo;