From a78661f4f4152563021714ca64c6825ee4839d7f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 19 Jun 2003 05:30:01 +0000 Subject: [PATCH] Fix Artist sort. Fix off-by-one error in BPM sort. --- stepmania/src/MusicWheel.cpp | 4 ++-- stepmania/src/Song.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index b9e29a79d6..033a286870 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -1255,7 +1255,7 @@ CString MusicWheel::GetSectionNameFromSongAndSort( const Song* pSong, SongSortOr switch( so ) { case SORT_TITLE: s = pSong->GetTranslitMainTitle(); break; - case SORT_ARTIST: s = pSong->m_sArtist; break; + case SORT_ARTIST: s = pSong->GetTranslitArtist(); break; default: ASSERT(0); } s = MakeSortString(s); // resulting string will be uppercase @@ -1275,7 +1275,7 @@ CString MusicWheel::GetSectionNameFromSongAndSort( const Song* pSong, SongSortOr float fMinBPM, fMaxBPM; pSong->GetDisplayBPM( fMinBPM, fMaxBPM ); int iMaxBPM = (int)fMaxBPM; - iMaxBPM += iBPMGroupSize - (iMaxBPM%iBPMGroupSize); + iMaxBPM += iBPMGroupSize - (iMaxBPM%iBPMGroupSize) - 1; return ssprintf("%03d-%03d",iMaxBPM-(iBPMGroupSize-1), iMaxBPM); } case SORT_MOST_PLAYED: diff --git a/stepmania/src/Song.cpp b/stepmania/src/Song.cpp index 19d69240cc..98f668ca12 100644 --- a/stepmania/src/Song.cpp +++ b/stepmania/src/Song.cpp @@ -1233,8 +1233,8 @@ void SortSongPointerArrayByGrade( vector &arraySongPointers ) int CompareSongPointersByArtist(const Song *pSong1, const Song *pSong2) { - CString s1 = pSong1->m_sArtist; - CString s2 = pSong2->m_sArtist; + CString s1 = pSong1->GetTranslitArtist(); + CString s2 = pSong2->GetTranslitArtist(); s1 = MakeSortString(s1); s2 = MakeSortString(s2);