diff --git a/stepmania/src/ScreenOptionsMaster.cpp b/stepmania/src/ScreenOptionsMaster.cpp index 21c5839b07..edec5cebc8 100644 --- a/stepmania/src/ScreenOptionsMaster.cpp +++ b/stepmania/src/ScreenOptionsMaster.cpp @@ -366,13 +366,6 @@ ScreenOptionsMaster::ScreenOptionsMaster( CString sClassName ): { LOG->Trace("ScreenOptionsMaster::ScreenOptionsMaster(%s)", m_sName.c_str() ); - /* If this file doesn't exist, leave the music alone (eg. ScreenPlayerOptions music sample - * left over from ScreenSelectMusic). If you really want to play no music, add a redir - * to _silent. */ - CString MusicPath = THEME->GetPathS( m_sName, "music", true ); - if( MusicPath != "" ) - SOUND->PlayMusic( MusicPath ); - CStringArray asLineNames; split( LINE_NAMES, ",", asLineNames ); if( asLineNames.empty() ) @@ -465,6 +458,24 @@ ScreenOptionsMaster::~ScreenOptionsMaster() delete [] m_OptionRowAlloc; } +void ScreenOptionsMaster::Update( float fDelta ) +{ + if( m_bFirstUpdate ) + { + /* + * Don't play sounds during the ctor, since derived classes havn't loaded yet. + * If this file doesn't exist, leave the music alone (eg. ScreenPlayerOptions music sample + * left over from ScreenSelectMusic). If you really want to play no music, add a redir + * to _silent. + */ + CString MusicPath = THEME->GetPathS( m_sName, "music", true ); + if( MusicPath != "" ) + SOUND->PlayMusic( MusicPath ); + } + + ScreenOptions::Update( fDelta ); +} + void SelectExactlyOne( int iSelection, vector &vbSelectedOut ) { for( int i=0; i<(int)vbSelectedOut.size(); i++ ) diff --git a/stepmania/src/ScreenOptionsMaster.h b/stepmania/src/ScreenOptionsMaster.h index adf1a126d1..d74ee35975 100644 --- a/stepmania/src/ScreenOptionsMaster.h +++ b/stepmania/src/ScreenOptionsMaster.h @@ -12,6 +12,7 @@ class ScreenOptionsMaster: public ScreenOptions public: ScreenOptionsMaster( CString sName ); virtual ~ScreenOptionsMaster(); + void Update( float fDelta ); private: