From 28a3a099b16a3dc0923d2ad0528cb9d163728e8a Mon Sep 17 00:00:00 2001 From: Thad Ward Date: Mon, 24 May 2004 09:40:26 +0000 Subject: [PATCH] Store the selected name to the profile before trimming spaces, so that the name appears properly next time the player enters their name. --- stepmania/src/ScreenNameEntryTraditional.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ScreenNameEntryTraditional.cpp b/stepmania/src/ScreenNameEntryTraditional.cpp index 03bf3e9247..74b62df1a9 100644 --- a/stepmania/src/ScreenNameEntryTraditional.cpp +++ b/stepmania/src/ScreenNameEntryTraditional.cpp @@ -573,16 +573,17 @@ void ScreenNameEntryTraditional::Finish( PlayerNumber pn ) UpdateSelectionText( pn ); /* hide NAME_ cursor */ CString selection = WStringToCString( m_sSelection[pn] ); - TrimRight( selection, " " ); - TrimLeft( selection, " " ); - - GAMESTATE->StoreRankingName( pn, selection ); // save last used ranking name Profile* pProfile = PROFILEMAN->GetProfile(pn); if( pProfile ) pProfile->m_sLastUsedHighScoreName = selection; + TrimRight( selection, " " ); + TrimLeft( selection, " " ); + + GAMESTATE->StoreRankingName( pn, selection ); + OFF_COMMAND( m_Keyboard[pn] ); for( int i = 0; i < (int)m_textAlphabet[pn].size(); ++i ) OFF_COMMAND( m_textAlphabet[pn][i] );