From 806d9cbafa3e68c2300a58ae425c2e9da16cc026 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 22 Feb 2004 02:51:27 +0000 Subject: [PATCH] Don't save unplayed PlayModes and styles. --- stepmania/src/Profile.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 94a3afe05f..da8550915a 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -469,13 +469,21 @@ XNode* Profile::SaveGeneralDataCreateNode() const { XNode* pNumSongsPlayedByPlayMode = pGeneralDataNode->AppendChild("NumSongsPlayedByPlayMode"); FOREACH_PlayMode( pm ) + { + /* Don't save unplayed PlayModes. */ + if( !m_iNumSongsPlayedByPlayMode[pm] ) + continue; pNumSongsPlayedByPlayMode->AppendChild( PlayModeToString(pm), m_iNumSongsPlayedByPlayMode[pm] ); + } } { XNode* pNumSongsPlayedByStyle = pGeneralDataNode->AppendChild("NumSongsPlayedByStyle"); for( int i=0; iGetStyleDefForStyle((Style)i)->m_szName; pNumSongsPlayedByStyle->AppendChild( sStyle, m_iNumSongsPlayedByStyle[i] ); }