fix local profile loading
This commit is contained in:
@@ -124,8 +124,9 @@ int Profile::GetTotalNumSongsPlayed()
|
|||||||
|
|
||||||
CString Profile::GetProfileDisplayNameFromDir( CString sDir )
|
CString Profile::GetProfileDisplayNameFromDir( CString sDir )
|
||||||
{
|
{
|
||||||
// FIXME!
|
Profile profile;
|
||||||
return "";
|
profile.LoadEditableDataFromDir( sDir );
|
||||||
|
return profile.GetDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Profile::GetSongNumTimesPlayed( const Song* pSong ) const
|
int Profile::GetSongNumTimesPlayed( const Song* pSong ) const
|
||||||
|
|||||||
@@ -191,16 +191,16 @@ bool ProfileManager::CreateMemoryCardProfile( PlayerNumber pn )
|
|||||||
return CreateProfile( sDir, NEW_MEM_CARD_NAME );
|
return CreateProfile( sDir, NEW_MEM_CARD_NAME );
|
||||||
}
|
}
|
||||||
|
|
||||||
//bool ProfileManager::LoadFirstAvailableProfile( PlayerNumber pn )
|
bool ProfileManager::LoadFirstAvailableProfile( PlayerNumber pn )
|
||||||
//{
|
{
|
||||||
// if( LoadProfileFromMemoryCard(pn) )
|
if( LoadProfileFromMemoryCard(pn) )
|
||||||
// return true;
|
return true;
|
||||||
//
|
|
||||||
// if( LoadDefaultProfileFromMachine(pn) )
|
if( LoadDefaultProfileFromMachine(pn) )
|
||||||
// return true;
|
return true;
|
||||||
//
|
|
||||||
// return false;
|
return false;
|
||||||
//}
|
}
|
||||||
|
|
||||||
bool ProfileManager::SaveProfile( PlayerNumber pn ) const
|
bool ProfileManager::SaveProfile( PlayerNumber pn ) const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ public:
|
|||||||
void GetLocalProfileIDs( vector<CString> &asProfileIDsOut ) const;
|
void GetLocalProfileIDs( vector<CString> &asProfileIDsOut ) const;
|
||||||
void GetLocalProfileNames( vector<CString> &asNamesOut ) const;
|
void GetLocalProfileNames( vector<CString> &asNamesOut ) const;
|
||||||
|
|
||||||
|
bool LoadFirstAvailableProfile( PlayerNumber pn ); // memory card or local profile
|
||||||
bool LoadProfileFromMemoryCard( PlayerNumber pn );
|
bool LoadProfileFromMemoryCard( PlayerNumber pn );
|
||||||
// bool LoadFirstAvailableProfile( PlayerNumber pn ); // memory card or local profile
|
|
||||||
bool SaveProfile( PlayerNumber pn ) const;
|
bool SaveProfile( PlayerNumber pn ) const;
|
||||||
void UnloadProfile( PlayerNumber pn );
|
void UnloadProfile( PlayerNumber pn );
|
||||||
|
|
||||||
|
|||||||
@@ -195,8 +195,7 @@ bool Screen::JoinInput( const DeviceInput& DeviceI, const InputEventType type, c
|
|||||||
if( GAMESTATE->m_MasterPlayerNumber == PLAYER_INVALID )
|
if( GAMESTATE->m_MasterPlayerNumber == PLAYER_INVALID )
|
||||||
GAMESTATE->m_MasterPlayerNumber = MenuI.player;
|
GAMESTATE->m_MasterPlayerNumber = MenuI.player;
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
PROFILEMAN->LoadFirstAvailableProfile( MenuI.player );
|
||||||
PROFILEMAN->LoadProfileFromMemoryCard( (PlayerNumber)p );
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
|
|
||||||
SOUND->PlayOnce( THEME->GetPathToS("Common start") );
|
SOUND->PlayOnce( THEME->GetPathToS("Common start") );
|
||||||
|
|||||||
Reference in New Issue
Block a user