add WriteMachineStatsHtml, WriteMachineStatsHtml; only write machine
stats by default
This commit is contained in:
@@ -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 );
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -700,6 +700,9 @@ bool Profile::SaveAllToDir( CString sDir, bool bSignData ) const
|
|||||||
DeleteCategoryScoresFromDirSM390a12( sDir );
|
DeleteCategoryScoresFromDirSM390a12( sDir );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool bThisIsMachineProfile = (this == PROFILEMAN->GetMachineProfile()); // XXX
|
||||||
|
if( (bThisIsMachineProfile && PREFSMAN->m_bWriteMachineStatsHtml) ||
|
||||||
|
(!bThisIsMachineProfile && PREFSMAN->m_bWriteProfileStatsHtml) )
|
||||||
SaveStatsWebPageToDir( sDir );
|
SaveStatsWebPageToDir( sDir );
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user