diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index f7155a983d..268677537f 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -85,6 +85,7 @@ void GameState::Reset() m_CurStyle = STYLE_INVALID; for( p=0; pLockCards( true ); SONGMAN->LoadAllFromProfiles(); @@ -224,8 +230,6 @@ void GameState::PlayersFinalized() if( m_pCurSong == NULL && pProfile->m_pLastSong ) m_pCurSong = pProfile->m_pLastSong; } - - } /* This data is added to each player profile, and to the machine profile per-player. */ diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 19f01a0678..937e4dbd21 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -53,6 +53,7 @@ public: Game m_CurGame; Style m_CurStyle; bool m_bSideIsJoined[NUM_PLAYERS]; // left side, right side + bool m_bPlayersFinalized; PlayMode m_PlayMode; // many screens display different info depending on this value int m_iCoins; // not "credits" PlayerNumber m_MasterPlayerNumber; // used in Styles where one player controls both sides diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 87f07579e2..f6784a05d5 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -36,6 +36,7 @@ #include "SongUtil.h" #include "StepsUtil.h" #include "CourseUtil.h" +#include "RageFileManager.h" SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program @@ -954,9 +955,12 @@ void SongManager::UpdateRankingCourses() void SongManager::LoadAllFromProfiles() { - for( int s=0; sGetProfileDir( (ProfileSlot)s ); + if( !PROFILEMAN->IsUsingProfile(s) ) + continue; + + CString sProfileDir = PROFILEMAN->GetProfileDir( s ); if( sProfileDir.empty() ) continue; // skip // @@ -964,6 +968,9 @@ void SongManager::LoadAllFromProfiles() // { CString sEditsDir = sProfileDir+"Edits/"; + + FILEMAN->FlushDirCache( sEditsDir ); + CStringArray asEditsFilesWithPath; GetDirListing( sEditsDir+"*.sm", asEditsFilesWithPath, false, true );