fix local profile loading

This commit is contained in:
Chris Danford
2004-02-22 03:44:04 +00:00
parent 4658cda3dd
commit b12ea17458
4 changed files with 15 additions and 15 deletions
+3 -2
View File
@@ -124,8 +124,9 @@ int Profile::GetTotalNumSongsPlayed()
CString Profile::GetProfileDisplayNameFromDir( CString sDir )
{
// FIXME!
return "";
Profile profile;
profile.LoadEditableDataFromDir( sDir );
return profile.GetDisplayName();
}
int Profile::GetSongNumTimesPlayed( const Song* pSong ) const
+10 -10
View File
@@ -191,16 +191,16 @@ bool ProfileManager::CreateMemoryCardProfile( PlayerNumber pn )
return CreateProfile( sDir, NEW_MEM_CARD_NAME );
}
//bool ProfileManager::LoadFirstAvailableProfile( PlayerNumber pn )
//{
// if( LoadProfileFromMemoryCard(pn) )
// return true;
//
// if( LoadDefaultProfileFromMachine(pn) )
// return true;
//
// return false;
//}
bool ProfileManager::LoadFirstAvailableProfile( PlayerNumber pn )
{
if( LoadProfileFromMemoryCard(pn) )
return true;
if( LoadDefaultProfileFromMachine(pn) )
return true;
return false;
}
bool ProfileManager::SaveProfile( PlayerNumber pn ) const
{
+1 -1
View File
@@ -33,8 +33,8 @@ public:
void GetLocalProfileIDs( vector<CString> &asProfileIDsOut ) const;
void GetLocalProfileNames( vector<CString> &asNamesOut ) const;
bool LoadFirstAvailableProfile( PlayerNumber pn ); // memory card or local profile
bool LoadProfileFromMemoryCard( PlayerNumber pn );
// bool LoadFirstAvailableProfile( PlayerNumber pn ); // memory card or local profile
bool SaveProfile( PlayerNumber pn ) const;
void UnloadProfile( PlayerNumber pn );
+1 -2
View File
@@ -195,8 +195,7 @@ bool Screen::JoinInput( const DeviceInput& DeviceI, const InputEventType type, c
if( GAMESTATE->m_MasterPlayerNumber == PLAYER_INVALID )
GAMESTATE->m_MasterPlayerNumber = MenuI.player;
for( int p=0; p<NUM_PLAYERS; p++ )
PROFILEMAN->LoadProfileFromMemoryCard( (PlayerNumber)p );
PROFILEMAN->LoadFirstAvailableProfile( MenuI.player );
SCREENMAN->RefreshCreditsMessages();
SOUND->PlayOnce( THEME->GetPathToS("Common start") );