From 6a73cdd1bab38739080986ea114ca6d7443ad211 Mon Sep 17 00:00:00 2001 From: Kyzentun Keeslala Date: Tue, 22 Mar 2016 09:22:52 -0600 Subject: [PATCH] Added DisableUploadDir preference. Updated changelog. --- Docs/Changelog_sm5.txt | 7 +++++++ src/PrefsManager.cpp | 1 + src/PrefsManager.h | 1 + src/StatsManager.cpp | 6 +++++- 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 0042ed063c..12e4d6d28b 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -4,6 +4,13 @@ The StepMania 5 Changelog covers all post-sm-ssc changes. For a list of changes from StepMania 4 alpha 5 to sm-ssc v1.2.5, see Changelog_sm-ssc.txt. ________________________________________________________________________________ +2016/03/22 +---------- +* [Prefs] Added DisableUploadDir preference to skip saving a score entry to + Save/Upload every time a song is played. Generating the unique filename + can take several seconds when there are years of scores accumulated, and it + clutters the disk. This preference defaults to false. [kyzentun] + 2016/03/17 ---------- * [Actor] Added get and set_tween_uses_effect_delta lua functions to make an diff --git a/src/PrefsManager.cpp b/src/PrefsManager.cpp index 384a51c7b8..f3824a3a43 100644 --- a/src/PrefsManager.cpp +++ b/src/PrefsManager.cpp @@ -258,6 +258,7 @@ PrefsManager::PrefsManager() : m_iMaxHighScoresPerListForMachine ( "MaxHighScoresPerListForMachine", 10 ), m_iMaxHighScoresPerListForPlayer ( "MaxHighScoresPerListForPlayer", 3 ), m_bAllowMultipleHighScoreWithSameName ( "AllowMultipleHighScoreWithSameName", true ), + m_DisableUploadDir("DisableUploadDir", false), m_bCelShadeModels ( "CelShadeModels", false ), // Work-In-Progress.. disable by default. m_bPreferredSortUsesGroups ( "PreferredSortUsesGroups", true ), m_fDebounceCoinInputTime ( "DebounceCoinInputTime", 0 ), diff --git a/src/PrefsManager.h b/src/PrefsManager.h index e12a87b9b9..41e016fe9b 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -249,6 +249,7 @@ public: Preference m_iMaxHighScoresPerListForMachine; Preference m_iMaxHighScoresPerListForPlayer; Preference m_bAllowMultipleHighScoreWithSameName; + Preference m_DisableUploadDir; Preference m_bCelShadeModels; Preference m_bPreferredSortUsesGroups; Preference m_fDebounceCoinInputTime; // allow users to apply a distinct debounce to coin input diff --git a/src/StatsManager.cpp b/src/StatsManager.cpp index 2cc4967df9..3cf5163c8f 100644 --- a/src/StatsManager.cpp +++ b/src/StatsManager.cpp @@ -230,8 +230,12 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS ) } } - // Save recent scores + // Not sure what the Save/Upload folder was originally for, but the files + // in it just accumulate uselessly, wasting several seconds when finishing + // a song. So this pref disables it. -Kyz + if(!PREFSMAN->m_DisableUploadDir) { + // Save recent scores auto_ptr xml( new XNode("Stats") ); xml->AppendChild( "MachineGuid", PROFILEMAN->GetMachineProfile()->m_sGuid );