Remove bSwitchToLastPlayedGame.

Simplify.
This commit is contained in:
Glenn Maynard
2003-10-08 08:01:41 +00:00
parent 8475d5fbd5
commit 17e0fb52b9
3 changed files with 11 additions and 19 deletions
+9 -14
View File
@@ -162,19 +162,23 @@ PrefsManager::PrefsManager()
m_sCoursesToShowRanking = ""; m_sCoursesToShowRanking = "";
ReadGlobalPrefsFromDisk( true ); ReadGlobalPrefsFromDisk();
} }
PrefsManager::~PrefsManager() PrefsManager::~PrefsManager()
{ {
} }
void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame, CString fn ) void PrefsManager::ReadGlobalPrefsFromDisk()
{ {
IniFile ini; IniFile ini;
ini.SetPath( fn ); ini.SetPath( STEPMANIA_INI_PATH );
if( !ini.ReadFile() ) ini.ReadFile();
return; // could not read config file, load nothing
/* 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", "Windowed", m_bWindowed );
ini.GetValue( "Options", "Interlaced", m_bInterlaced ); 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 void PrefsManager::SaveGlobalPrefsToDisk() const
{ {
IniFile ini; IniFile ini;
+1 -4
View File
@@ -136,15 +136,12 @@ public:
/* Game-specific prefs: */ /* Game-specific prefs: */
CString m_sDefaultModifiers; CString m_sDefaultModifiers;
void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ); void ReadGlobalPrefsFromDisk();
void SaveGlobalPrefsToDisk() const; void SaveGlobalPrefsToDisk() const;
void ReadGamePrefsFromDisk(); void ReadGamePrefsFromDisk();
void SaveGamePrefsToDisk(); void SaveGamePrefsToDisk();
private:
void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame, CString fn );
}; };
+1 -1
View File
@@ -793,7 +793,7 @@ int main(int argc, char* argv[])
delete loading_window; // destroy this before init'ing Display delete loading_window; // destroy this before init'ing Display
/* XXX: Why do we reload global prefs? PREFSMAN loads them in the ctor. -glenn */ /* XXX: Why do we reload global prefs? PREFSMAN loads them in the ctor. -glenn */
PREFSMAN->ReadGlobalPrefsFromDisk( true ); PREFSMAN->ReadGlobalPrefsFromDisk();
ReadGamePrefsFromDisk(); ReadGamePrefsFromDisk();
DISPLAY = CreateDisplay(); DISPLAY = CreateDisplay();