Remove bSwitchToLastPlayedGame.
Simplify.
This commit is contained in:
@@ -162,19 +162,23 @@ PrefsManager::PrefsManager()
|
||||
|
||||
m_sCoursesToShowRanking = "";
|
||||
|
||||
ReadGlobalPrefsFromDisk( true );
|
||||
ReadGlobalPrefsFromDisk();
|
||||
}
|
||||
|
||||
PrefsManager::~PrefsManager()
|
||||
{
|
||||
}
|
||||
|
||||
void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame, CString fn )
|
||||
void PrefsManager::ReadGlobalPrefsFromDisk()
|
||||
{
|
||||
IniFile ini;
|
||||
ini.SetPath( fn );
|
||||
if( !ini.ReadFile() )
|
||||
return; // could not read config file, load nothing
|
||||
ini.SetPath( STEPMANIA_INI_PATH );
|
||||
ini.ReadFile();
|
||||
|
||||
/* Load this on top of the regular INI; if it exists, any settings listed
|
||||
* in it will override user settings. */
|
||||
ini.SetPath( STATIC_INI_PATH );
|
||||
ini.ReadFile();
|
||||
|
||||
ini.GetValue( "Options", "Windowed", m_bWindowed );
|
||||
ini.GetValue( "Options", "Interlaced", m_bInterlaced );
|
||||
@@ -293,15 +297,6 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame, CStrin
|
||||
}
|
||||
}
|
||||
|
||||
void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
{
|
||||
ReadGlobalPrefsFromDisk( bSwitchToLastPlayedGame, STEPMANIA_INI_PATH );
|
||||
|
||||
/* Load this on top of the regular INI; if it exists, any settings listed
|
||||
* in it will override user settings. */
|
||||
ReadGlobalPrefsFromDisk( bSwitchToLastPlayedGame, STATIC_INI_PATH );
|
||||
}
|
||||
|
||||
void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
{
|
||||
IniFile ini;
|
||||
|
||||
@@ -136,15 +136,12 @@ public:
|
||||
/* Game-specific prefs: */
|
||||
CString m_sDefaultModifiers;
|
||||
|
||||
void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame );
|
||||
void ReadGlobalPrefsFromDisk();
|
||||
void SaveGlobalPrefsToDisk() const;
|
||||
|
||||
|
||||
void ReadGamePrefsFromDisk();
|
||||
void SaveGamePrefsToDisk();
|
||||
|
||||
private:
|
||||
void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame, CString fn );
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -793,7 +793,7 @@ int main(int argc, char* argv[])
|
||||
delete loading_window; // destroy this before init'ing Display
|
||||
|
||||
/* XXX: Why do we reload global prefs? PREFSMAN loads them in the ctor. -glenn */
|
||||
PREFSMAN->ReadGlobalPrefsFromDisk( true );
|
||||
PREFSMAN->ReadGlobalPrefsFromDisk();
|
||||
ReadGamePrefsFromDisk();
|
||||
|
||||
DISPLAY = CreateDisplay();
|
||||
|
||||
Reference in New Issue
Block a user