add WriteMachineStatsHtml, WriteMachineStatsHtml; only write machine
stats by default
This commit is contained in:
@@ -231,6 +231,9 @@ void PrefsManager::Init()
|
||||
m_bAnisotropicFiltering = false;
|
||||
g_bAutoRestart = false;
|
||||
m_bSignProfileData = false;
|
||||
/* Most people use local profiles, so writing profile stats is redundant. */
|
||||
m_bWriteMachineStatsHtml = true;
|
||||
m_bWriteProfileStatsHtml = false;
|
||||
|
||||
m_bEditorShowBGChangesPlay = false;
|
||||
|
||||
@@ -529,6 +532,8 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
||||
ini.GetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering );
|
||||
ini.GetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||
ini.GetValue( "Options", "SignProfileData", m_bSignProfileData );
|
||||
ini.GetValue( "Options", "WriteMachineStatsHtml", m_bWriteMachineStatsHtml );
|
||||
ini.GetValue( "Options", "WriteProfileStatsHtml", m_bWriteProfileStatsHtml );
|
||||
|
||||
ini.GetValue( "Editor", "ShowBGChangesPlay", m_bEditorShowBGChangesPlay );
|
||||
|
||||
@@ -753,6 +758,8 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
ini.SetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering );
|
||||
ini.SetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||
ini.SetValue( "Options", "SignProfileData", m_bSignProfileData );
|
||||
ini.SetValue( "Options", "WriteMachineStatsHtml", m_bWriteMachineStatsHtml );
|
||||
ini.SetValue( "Options", "WriteProfileStatsHtml", m_bWriteProfileStatsHtml );
|
||||
|
||||
ini.SetValue( "Options", "SoundWriteAhead", m_iSoundWriteAhead );
|
||||
|
||||
|
||||
@@ -211,7 +211,8 @@ public:
|
||||
// and verified when reading profile data. Leave this false if
|
||||
// you want to use a profile on different machines that don't
|
||||
// have the same key, or else the profile's data will be discarded.
|
||||
bool m_bSignProfileData;
|
||||
bool m_bSignProfileData;
|
||||
bool m_bWriteMachineStatsHtml, m_bWriteProfileStatsHtml;
|
||||
|
||||
/* Editor prefs: */
|
||||
bool m_bEditorShowBGChangesPlay;
|
||||
|
||||
@@ -700,7 +700,10 @@ bool Profile::SaveAllToDir( CString sDir, bool bSignData ) const
|
||||
DeleteCategoryScoresFromDirSM390a12( sDir );
|
||||
}
|
||||
|
||||
SaveStatsWebPageToDir( sDir );
|
||||
const bool bThisIsMachineProfile = (this == PROFILEMAN->GetMachineProfile()); // XXX
|
||||
if( (bThisIsMachineProfile && PREFSMAN->m_bWriteMachineStatsHtml) ||
|
||||
(!bThisIsMachineProfile && PREFSMAN->m_bWriteProfileStatsHtml) )
|
||||
SaveStatsWebPageToDir( sDir );
|
||||
|
||||
//
|
||||
// create edits dir
|
||||
|
||||
@@ -18,7 +18,13 @@ static void SaveMachineStatsToFirstMemCard()
|
||||
|
||||
CString sDir = MEM_CARD_MOUNT_POINT[pn];
|
||||
sDir += "MachineProfile/";
|
||||
|
||||
bool bOldVal = PREFSMAN->m_bWriteMachineStatsHtml;
|
||||
PREFSMAN->m_bWriteMachineStatsHtml = true;
|
||||
|
||||
PROFILEMAN->GetMachineProfile()->SaveAllToDir( sDir, PREFSMAN->m_bSignProfileData );
|
||||
|
||||
PREFSMAN->m_bWriteMachineStatsHtml = bOldVal;
|
||||
SCREENMAN->SystemMessage( ssprintf("Machine stats saved to P%d card.",pn+1) );
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user