Store the group names in the map case insensitively.
This commit is contained in:
@@ -222,7 +222,7 @@ void SongManager::LoadStepManiaSongDir( RString sDir, LoadingWindow *ld )
|
|||||||
(sDir+sGroupDirName).c_str() );
|
(sDir+sGroupDirName).c_str() );
|
||||||
int loaded = 0;
|
int loaded = 0;
|
||||||
|
|
||||||
SongPointerVector& index_entry = m_mapSongGroupIndex[sGroupDirName];
|
SongPointerVector& index_entry = m_mapSongGroupIndex[istring(sGroupDirName)];
|
||||||
|
|
||||||
for( unsigned j=0; j< arraySongDirs.size(); ++j ) // for each song dir
|
for( unsigned j=0; j< arraySongDirs.size(); ++j ) // for each song dir
|
||||||
{
|
{
|
||||||
@@ -273,7 +273,7 @@ void SongManager::LoadGroupSymLinks(RString sDir, RString sGroupFolder)
|
|||||||
vector<RString> arraySymLinks;
|
vector<RString> arraySymLinks;
|
||||||
GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false );
|
GetDirListing( sDir+sGroupFolder+"/*.include", arraySymLinks, false );
|
||||||
SortRStringArray( arraySymLinks );
|
SortRStringArray( arraySymLinks );
|
||||||
SongPointerVector& index_entry = m_mapSongGroupIndex[sGroupFolder];
|
SongPointerVector& index_entry = m_mapSongGroupIndex[istring(sGroupFolder)];
|
||||||
for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song.
|
for( unsigned s=0; s< arraySymLinks.size(); s++ ) // for each symlink in this dir, add it in as a song.
|
||||||
{
|
{
|
||||||
MsdFile msdF;
|
MsdFile msdF;
|
||||||
@@ -526,7 +526,7 @@ const vector<Song*> &SongManager::GetSongs( const RString &sGroupName ) const
|
|||||||
|
|
||||||
if( sGroupName == GROUP_ALL )
|
if( sGroupName == GROUP_ALL )
|
||||||
return m_pSongs;
|
return m_pSongs;
|
||||||
map<RString, SongPointerVector>::const_iterator iter = m_mapSongGroupIndex.find( sGroupName );
|
map<istring, SongPointerVector>::const_iterator iter = m_mapSongGroupIndex.find( istring(sGroupName) );
|
||||||
if ( iter != m_mapSongGroupIndex.end() )
|
if ( iter != m_mapSongGroupIndex.end() )
|
||||||
return iter->second;
|
return iter->second;
|
||||||
return vEmpty;
|
return vEmpty;
|
||||||
@@ -1250,7 +1250,8 @@ Song *SongManager::FindSong( RString sPath )
|
|||||||
Song *SongManager::FindSong( RString sGroup, RString sSong )
|
Song *SongManager::FindSong( RString sGroup, RString sSong )
|
||||||
{
|
{
|
||||||
// foreach song
|
// foreach song
|
||||||
FOREACH_CONST( Song*, m_pSongs, s )
|
const vector<Song *> &vSongs = GetSongs( sGroup.empty()? GROUP_ALL:sGroup );
|
||||||
|
FOREACH_CONST( Song*, vSongs, s )
|
||||||
{
|
{
|
||||||
if( (*s)->Matches(sGroup, sSong) )
|
if( (*s)->Matches(sGroup, sSong) )
|
||||||
return *s;
|
return *s;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ struct lua_State;
|
|||||||
#include "Course.h"
|
#include "Course.h"
|
||||||
#include "ThemeMetric.h"
|
#include "ThemeMetric.h"
|
||||||
#include "RageTexturePreloader.h"
|
#include "RageTexturePreloader.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
|
|
||||||
const int MAX_EDIT_STEPS_PER_PROFILE = 200;
|
const int MAX_EDIT_STEPS_PER_PROFILE = 200;
|
||||||
const int MAX_EDIT_COURSES_PER_PROFILE = 20;
|
const int MAX_EDIT_COURSES_PER_PROFILE = 20;
|
||||||
@@ -139,7 +140,7 @@ protected:
|
|||||||
vector<SongPointerVector> m_vPreferredSongSort;
|
vector<SongPointerVector> m_vPreferredSongSort;
|
||||||
vector<RString> m_sSongGroupNames;
|
vector<RString> m_sSongGroupNames;
|
||||||
vector<RString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
vector<RString> m_sSongGroupBannerPaths; // each song group may have a banner associated with it
|
||||||
map<RString,SongPointerVector> m_mapSongGroupIndex;
|
map<istring,SongPointerVector> m_mapSongGroupIndex;
|
||||||
|
|
||||||
vector<Course*> m_pCourses;
|
vector<Course*> m_pCourses;
|
||||||
vector<Course*> m_pPopularCourses[NUM_ProfileSlot][NUM_CourseType];
|
vector<Course*> m_pPopularCourses[NUM_ProfileSlot][NUM_CourseType];
|
||||||
|
|||||||
Reference in New Issue
Block a user