diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index 144618d3a3..3dd03ac3d4 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -232,6 +232,16 @@ Profile* ProfileManager::GetProfile( PlayerNumber pn ) return &m_Profile[pn]; } +CString ProfileManager::GetPlayerName( PlayerNumber pn ) +{ + Profile *prof = ProfileManager::GetProfile( pn ); + if( prof ) + return prof->m_sLastUsedHighScoreName; + + const char *names[NUM_PLAYERS] = { "PLAYER 1", "PLAYER 2" }; + return names[pn]; +} + bool Profile::LoadFromIni( CString sIniPath ) { Init(); diff --git a/stepmania/src/ProfileManager.h b/stepmania/src/ProfileManager.h index daa329c621..ec02e63884 100644 --- a/stepmania/src/ProfileManager.h +++ b/stepmania/src/ProfileManager.h @@ -85,6 +85,7 @@ public: Profile* GetMachineProfile() { return &m_MachineProfile; } + CString GetPlayerName( PlayerNumber pn ); bool IsUsingMemoryCard( PlayerNumber pn ) { return m_bUsingMemoryCard[pn]; }