add WriteMachineStatsHtml, WriteMachineStatsHtml; only write machine

stats by default
This commit is contained in:
Glenn Maynard
2004-05-21 01:52:45 +00:00
parent 7ff0786223
commit cb582d1803
4 changed files with 19 additions and 2 deletions
+7
View File
@@ -231,6 +231,9 @@ void PrefsManager::Init()
m_bAnisotropicFiltering = false; m_bAnisotropicFiltering = false;
g_bAutoRestart = false; g_bAutoRestart = false;
m_bSignProfileData = false; m_bSignProfileData = false;
/* Most people use local profiles, so writing profile stats is redundant. */
m_bWriteMachineStatsHtml = true;
m_bWriteProfileStatsHtml = false;
m_bEditorShowBGChangesPlay = false; m_bEditorShowBGChangesPlay = false;
@@ -529,6 +532,8 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
ini.GetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering ); ini.GetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering );
ini.GetValue( "Options", "AutoRestart", g_bAutoRestart ); ini.GetValue( "Options", "AutoRestart", g_bAutoRestart );
ini.GetValue( "Options", "SignProfileData", m_bSignProfileData ); ini.GetValue( "Options", "SignProfileData", m_bSignProfileData );
ini.GetValue( "Options", "WriteMachineStatsHtml", m_bWriteMachineStatsHtml );
ini.GetValue( "Options", "WriteProfileStatsHtml", m_bWriteProfileStatsHtml );
ini.GetValue( "Editor", "ShowBGChangesPlay", m_bEditorShowBGChangesPlay ); ini.GetValue( "Editor", "ShowBGChangesPlay", m_bEditorShowBGChangesPlay );
@@ -753,6 +758,8 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering ); ini.SetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering );
ini.SetValue( "Options", "AutoRestart", g_bAutoRestart ); ini.SetValue( "Options", "AutoRestart", g_bAutoRestart );
ini.SetValue( "Options", "SignProfileData", m_bSignProfileData ); ini.SetValue( "Options", "SignProfileData", m_bSignProfileData );
ini.SetValue( "Options", "WriteMachineStatsHtml", m_bWriteMachineStatsHtml );
ini.SetValue( "Options", "WriteProfileStatsHtml", m_bWriteProfileStatsHtml );
ini.SetValue( "Options", "SoundWriteAhead", m_iSoundWriteAhead ); ini.SetValue( "Options", "SoundWriteAhead", m_iSoundWriteAhead );
+1
View File
@@ -212,6 +212,7 @@ public:
// you want to use a profile on different machines that don't // 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. // 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: */ /* Editor prefs: */
bool m_bEditorShowBGChangesPlay; bool m_bEditorShowBGChangesPlay;
+4 -1
View File
@@ -700,7 +700,10 @@ bool Profile::SaveAllToDir( CString sDir, bool bSignData ) const
DeleteCategoryScoresFromDirSM390a12( sDir ); 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 // create edits dir
@@ -18,7 +18,13 @@ static void SaveMachineStatsToFirstMemCard()
CString sDir = MEM_CARD_MOUNT_POINT[pn]; CString sDir = MEM_CARD_MOUNT_POINT[pn];
sDir += "MachineProfile/"; sDir += "MachineProfile/";
bool bOldVal = PREFSMAN->m_bWriteMachineStatsHtml;
PREFSMAN->m_bWriteMachineStatsHtml = true;
PROFILEMAN->GetMachineProfile()->SaveAllToDir( sDir, PREFSMAN->m_bSignProfileData ); PROFILEMAN->GetMachineProfile()->SaveAllToDir( sDir, PREFSMAN->m_bSignProfileData );
PREFSMAN->m_bWriteMachineStatsHtml = bOldVal;
SCREENMAN->SystemMessage( ssprintf("Machine stats saved to P%d card.",pn+1) ); SCREENMAN->SystemMessage( ssprintf("Machine stats saved to P%d card.",pn+1) );
return; return;
} }