accessors
This commit is contained in:
@@ -374,6 +374,11 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
if( !ini.ReadFile(sIni) )
|
if( !ini.ReadFile(sIni) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ReadGlobalPrefsFromIni( ini );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrefsManager::ReadGlobalPrefsFromIni( const IniFile &ini )
|
||||||
|
{
|
||||||
ini.GetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
ini.GetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
||||||
ini.GetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
ini.GetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
||||||
ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
|
||||||
@@ -575,7 +580,12 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
void PrefsManager::SaveGlobalPrefsToDisk() const
|
void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||||
{
|
{
|
||||||
IniFile ini;
|
IniFile ini;
|
||||||
|
SaveGlobalPrefsToIni( ini );
|
||||||
|
ini.WriteFile( STEPMANIA_INI_PATH );
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrefsManager::SaveGlobalPrefsToIni( IniFile &ini ) const
|
||||||
|
{
|
||||||
ini.SetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
ini.SetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
||||||
ini.SetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
ini.SetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
||||||
ini.SetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
ini.SetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
|
||||||
@@ -815,8 +825,6 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
|
|
||||||
FOREACHS_CONST( IPreference*, *SubscriptionManager<IPreference>::s_pSubscribers, p )
|
FOREACHS_CONST( IPreference*, *SubscriptionManager<IPreference>::s_pSubscribers, p )
|
||||||
(*p)->WriteTo( ini );
|
(*p)->WriteTo( ini );
|
||||||
|
|
||||||
ini.WriteFile( STEPMANIA_INI_PATH );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -293,6 +293,9 @@ public:
|
|||||||
bool m_bLogVirtualMemory; // (under debug) log the virtual memory allocation, etc.
|
bool m_bLogVirtualMemory; // (under debug) log the virtual memory allocation, etc.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void ReadGlobalPrefsFromIni( const IniFile &ini );
|
||||||
|
void SaveGlobalPrefsToIni( IniFile &ini ) const;
|
||||||
|
|
||||||
void ReadGlobalPrefsFromDisk();
|
void ReadGlobalPrefsFromDisk();
|
||||||
void SaveGlobalPrefsToDisk() const;
|
void SaveGlobalPrefsToDisk() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user