Remove bSwitchToLastPlayedGame.
Simplify.
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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 );
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user