From 84939d1a70aa8964c879c2810f5740dd171c357e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Mon, 21 Mar 2005 00:20:36 +0000 Subject: [PATCH] fix ScreenAttract looks for music even if PLAY_MUSIC=0 --- stepmania/src/ScreenAttract.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index f0c29629a1..4b430b84b9 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -133,8 +133,11 @@ void ScreenAttract::HandleScreenMessage( const ScreenMessage SM ) /* Look at the def of the screen we're going to; if it has a music theme element * and it's the same as the one we're playing now, don't stop. However, if we're * going to interrupt it when we fade in, stop the old music before we fade out. */ - bool bGoingToPlayTheSameMusic = - THEME->GetPathS( NEXT_SCREEN, "music", false) == THEME->GetPathS( m_sName, "music", false); + /* GetPath optional because this screen and the next screen may not have music - + * if PLAY_MUSIC == 0. We can't access PLAY_MUSIC from here. */ + CString sThisMusic = THEME->GetPathS( NEXT_SCREEN, "music", true ); + CString sNextMusic = THEME->GetPathS( m_sName, "music", true ); + bool bGoingToPlayTheSameMusic = sThisMusic == sNextMusic; if( bGoingToPlayTheSameMusic ) ; // do nothing else