diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index a31e04f2be..04cc47e798 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -158,7 +158,7 @@ void Profile::InitRecentCourseScores() m_vRecentCourseScores.clear(); } -CString Profile::GetDisplayName() const +CString Profile::GetDisplayNameOrHighScoreName() const { if( !m_sDisplayName.empty() ) return m_sDisplayName; @@ -897,7 +897,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const // TRICKY: These are write-only elements that are never read again. This // data is required by other apps (like internet ranking), but is // redundant to the game app. - pGeneralDataNode->AppendChild( "DisplayName", GetDisplayName() ); + pGeneralDataNode->AppendChild( "DisplayName", GetDisplayNameOrHighScoreName() ); pGeneralDataNode->AppendChild( "IsMachine", IsMachine() ); pGeneralDataNode->AppendChild( "IsWeightSet", m_iWeightPounds != 0 ); diff --git a/stepmania/src/Profile.h b/stepmania/src/Profile.h index c12614ba4d..23ef869712 100644 --- a/stepmania/src/Profile.h +++ b/stepmania/src/Profile.h @@ -63,7 +63,7 @@ public: // // smart accessors // - CString GetDisplayName() const; + CString GetDisplayNameOrHighScoreName() const; CString GetDisplayTotalCaloriesBurned() const; // remove me and use Lua instead CString GetDisplayTotalCaloriesBurnedToday() const; // remove me and use Lua instead int GetCalculatedWeightPounds() const; // returns a default value if m_iWeightPounds isn't set diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 7117fab087..b7aaed9bc7 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -229,7 +229,7 @@ bool ProfileManager::FastLoadProfileNameFromMemoryCard( CString sRootDir, CStrin Profile::LoadResult res = profile.LoadEditableDataFromDir( sDir ); if( res == Profile::success ) { - sName = profile.GetDisplayName(); + sName = profile.GetDisplayNameOrHighScoreName(); return true; } else if( res != Profile::failed_no_profile ) @@ -283,7 +283,7 @@ const Profile* ProfileManager::GetProfile( PlayerNumber pn ) const CString ProfileManager::GetPlayerName( PlayerNumber pn ) const { const Profile *prof = GetProfile( pn ); - return prof ? prof->GetDisplayName() : CString(""); + return prof ? prof->GetDisplayNameOrHighScoreName() : CString(""); } @@ -296,7 +296,7 @@ void ProfileManager::RefreshLocalProfilesEditableData() { Profile &pro = g_mapLocalProfileIdToEditableData[*s]; CString sProfileDir = LocalProfileIdToDir( *s ); - LOG->Trace(" '%s'", pro.GetDisplayName().c_str()); + LOG->Trace(" '%s'", pro.GetDisplayNameOrHighScoreName().c_str()); pro.LoadEditableDataFromDir( sProfileDir ); } } diff --git a/stepmania/src/ScreenSystemLayer.cpp b/stepmania/src/ScreenSystemLayer.cpp index ee27981681..5a8b393bd6 100644 --- a/stepmania/src/ScreenSystemLayer.cpp +++ b/stepmania/src/ScreenSystemLayer.cpp @@ -142,12 +142,12 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const case MEMORY_CARD_STATE_NO_CARD: // this is a local machine profile if( PROFILEMAN->LastLoadWasFromLastGood(pn) ) - return pProfile->GetDisplayName() + CREDITS_LOADED_FROM_LAST_GOOD_APPEND.GetValue(); + return pProfile->GetDisplayNameOrHighScoreName() + CREDITS_LOADED_FROM_LAST_GOOD_APPEND.GetValue(); else if( PROFILEMAN->LastLoadWasTamperedOrCorrupt(pn) ) return CREDITS_LOAD_FAILED.GetValue(); // Prefer the name of the profile over the name of the card. else if( PROFILEMAN->IsPersistentProfile(pn) ) - return pProfile->GetDisplayName(); + return pProfile->GetDisplayNameOrHighScoreName(); else if( GAMESTATE->PlayersCanJoin() ) return CREDITS_INSERT_CARD.GetValue(); else @@ -166,7 +166,7 @@ CString ScreenSystemLayer::GetCreditsMessage( PlayerNumber pn ) const // If there is a local profile loaded, prefer it over the name of the memory card. if( PROFILEMAN->IsPersistentProfile(pn) ) { - CString s = pProfile->GetDisplayName(); + CString s = pProfile->GetDisplayNameOrHighScoreName(); if( s.empty() ) s = CREDITS_CARD_NO_NAME.GetValue(); if( PROFILEMAN->LastLoadWasFromLastGood(pn) )