diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 3de4b0156b..2c16e34da8 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -270,6 +270,8 @@ void PrefsManager::Init() m_bHideDefaultNoteSkin = false; m_iMaxHighScoresPerListForMachine = 10; m_iMaxHighScoresPerListForPlayer = 3; + m_iMaxRecentScoresForMachine = 100; + m_iMaxRecentScoresForPlayer = 20; m_bAllowMultipleHighScoreWithSameName = true; m_fPadStickSeconds = 0; m_bForceMipMaps = false; @@ -477,6 +479,8 @@ void PrefsManager::ReadGlobalPrefsFromIni( const IniFile &ini ) ini.GetValue( "Options", "HideDefaultNoteSkin", m_bHideDefaultNoteSkin ); ini.GetValue( "Options", "MaxHighScoresPerListForMachine", m_iMaxHighScoresPerListForMachine ); ini.GetValue( "Options", "MaxHighScoresPerListForPlayer", m_iMaxHighScoresPerListForPlayer ); + ini.GetValue( "Options", "MaxRecentScoresForMachine", m_iMaxRecentScoresForMachine ); + ini.GetValue( "Options", "MaxRecentScoresForPlayer", m_iMaxRecentScoresForPlayer ); ini.GetValue( "Options", "AllowMultipleHighScoreWithSameName", m_bAllowMultipleHighScoreWithSameName ); ini.GetValue( "Options", "PadStickSeconds", m_fPadStickSeconds ); ini.GetValue( "Options", "ForceMipMaps", m_bForceMipMaps ); @@ -641,6 +645,8 @@ void PrefsManager::SaveGlobalPrefsToIni( IniFile &ini ) const ini.SetValue( "Options", "HideDefaultNoteSkin", m_bHideDefaultNoteSkin ); ini.SetValue( "Options", "MaxHighScoresPerListForMachine", m_iMaxHighScoresPerListForMachine ); ini.SetValue( "Options", "MaxHighScoresPerListForPlayer", m_iMaxHighScoresPerListForPlayer ); + ini.SetValue( "Options", "MaxRecentScoresForMachine", m_iMaxRecentScoresForMachine ); + ini.SetValue( "Options", "MaxRecentScoresForPlayer", m_iMaxRecentScoresForPlayer ); ini.SetValue( "Options", "AllowMultipleHighScoreWithSameName", m_bAllowMultipleHighScoreWithSameName ); ini.SetValue( "Options", "PadStickSeconds", m_fPadStickSeconds ); ini.SetValue( "Options", "ForceMipMaps", m_bForceMipMaps ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 46109c1f52..137a3db1ba 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -218,6 +218,8 @@ public: bool m_bHideDefaultNoteSkin; int m_iMaxHighScoresPerListForMachine; int m_iMaxHighScoresPerListForPlayer; + int m_iMaxRecentScoresForMachine; + int m_iMaxRecentScoresForPlayer; bool m_bAllowMultipleHighScoreWithSameName; bool m_bCelShadeModels; diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index f8c518c751..0c30b18e86 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -32,8 +32,6 @@ const CString COMMON_XSL = "Common.xsl"; #define GUID_SIZE_BYTES 8 -#define MAX_RECENT_SCORES_TO_SAVE 100 - #define MAX_EDITABLE_INI_SIZE_BYTES 2*1024 // 2KB #define MAX_PLAYER_STATS_XML_SIZE_BYTES \ 100 /* Songs */ \ @@ -1628,7 +1626,8 @@ XNode* Profile::SaveRecentSongScoresCreateNode() const XNode* pNode = new XNode; pNode->m_sName = "RecentSongScores"; - unsigned uNumToSave = min( m_vRecentStepsScores.size(), (unsigned)MAX_RECENT_SCORES_TO_SAVE ); + int iMaxRecentScoresToSave = IsMachine() ? PREFSMAN->m_iMaxRecentScoresForMachine : PREFSMAN->m_iMaxRecentScoresForPlayer; + unsigned uNumToSave = min( m_vRecentStepsScores.size(), (unsigned)iMaxRecentScoresToSave ); for( unsigned i=0; im_sName = "RecentCourseScores"; - unsigned uNumToSave = min( m_vRecentCourseScores.size(), (unsigned)MAX_RECENT_SCORES_TO_SAVE ); + int iMaxRecentScoresToSave = IsMachine() ? PREFSMAN->m_iMaxRecentScoresForMachine : PREFSMAN->m_iMaxRecentScoresForPlayer; + unsigned uNumToSave = min( m_vRecentStepsScores.size(), (unsigned)iMaxRecentScoresToSave ); for( unsigned i=0; i