diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 81ad869523..4e2dbe169f 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1081,11 +1081,7 @@ int main(int argc, char* argv[]) /* Set up the theme and announcer, and switch to the last game type. */ ReadGamePrefsFromDisk( true ); - { - CString sSection = "Preferences"; - GetCommandlineArgument( "Type", &sSection ); - THEME->LoadPreferencesFromSection( sSection ); - } + THEME->LoadPreferencesFromMetrics(); { /* Now that THEME is loaded, load the icon for the current theme into the diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index b53e477ea0..56b79ccd75 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -823,8 +823,17 @@ void ThemeManager::GetMetricsThatBeginWith( const CString &sClassName_, const CS } } -void ThemeManager::LoadPreferencesFromSection( const CString &sClassName ) +CString ThemeManager::GetPreferencesSection() const { + CString sSection = "Preferences"; + GetCommandlineArgument( "Type", &sSection ); + return sSection; +} + +void ThemeManager::LoadPreferencesFromMetrics() +{ + CString sClassName = GetPreferencesSection(); + set asNames; GetMetricsThatBeginWith( sClassName, "", asNames ); diff --git a/stepmania/src/ThemeManager.h b/stepmania/src/ThemeManager.h index f5046d5895..d451cf279e 100644 --- a/stepmania/src/ThemeManager.h +++ b/stepmania/src/ThemeManager.h @@ -82,7 +82,8 @@ public: void GetMetric( const CString &sClassName, const CString &sValueName, apActorCommands &valueOut ); void GetMetricsThatBeginWith( const CString &sClassName, const CString &sValueName, set &vsValueNamesOut ); - void LoadPreferencesFromSection( const CString &sClassName ); + CString GetPreferencesSection() const; + void LoadPreferencesFromMetrics(); static CString GetBlankGraphicPath();