From 2ee36923b73fca3fd1f583836ee6985082be03f8 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 5 Jan 2005 03:46:09 +0000 Subject: [PATCH] move StopMusic() to the right place --- stepmania/src/GameCommand.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stepmania/src/GameCommand.cpp b/stepmania/src/GameCommand.cpp index 390d27dc53..bdc0c98a6b 100644 --- a/stepmania/src/GameCommand.cpp +++ b/stepmania/src/GameCommand.cpp @@ -576,6 +576,12 @@ void GameCommand::Apply( PlayerNumber pn ) const UNLOCKMAN->UnlockCode( m_iUnlockIndex ); if( m_sSoundPath != "" ) SOUND->PlayOnce( THEME->GetPathToS( m_sSoundPath ) ); + + /* If we're going to stop music, do so before preparing new screens, so we don't + * stop music between preparing screens and loading screens. */ + if( m_bStopMusic ) + SOUND->StopMusic(); + FOREACH_CONST( CString, m_vsScreensToPrepare, s ) SCREENMAN->PrepareScreen( *s ); if( m_bDeletePreparedScreens ) @@ -676,10 +682,6 @@ void GameCommand::Apply( PlayerNumber pn ) const PREFSMAN->ResetToFactoryDefaults(); SCREENMAN->SystemMessage( "All options reset to factory defaults." ); } - if( m_bStopMusic ) - { - SOUND->StopMusic(); - } if( m_bApplyDefaultOptions ) { FOREACH_PlayerNumber( p )