From 7b693ad27099a0080707cf5bb022ca85f2eaa7b5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 13 May 2003 04:08:19 +0000 Subject: [PATCH] ignore (res 1x2) in font names --- stepmania/src/Font.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Font.cpp b/stepmania/src/Font.cpp index efe85c862d..f1ba854640 100644 --- a/stepmania/src/Font.cpp +++ b/stepmania/src/Font.cpp @@ -353,8 +353,13 @@ CString Font::GetFontName(CString FileName) if(drop_ext.Compare(FileName)) FileName.erase(FileName.size()-4); - /* If it ends in a dimension spec, remove it. */ + /* If it ends in a resolution spec, remove it. */ CStringArray mat; + static Regex ResSpec("( \\(res [0-9]+x[0-9]+\\))$"); + if(ResSpec.Compare(FileName, mat)) + FileName.erase(FileName.size()-mat[0].size()); + + /* If it ends in a dimension spec, remove it. */ static Regex DimSpec("( [0-9]+x[0-9]+)$"); if(DimSpec.Compare(FileName, mat)) FileName.erase(FileName.size()-mat[0].size());