From 9fcb3c6bfca0553c2f6ae83ed61ca3d050585243 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 10 Sep 2004 03:37:33 +0000 Subject: [PATCH] fix sample not starting when selecting fast --- stepmania/src/ScreenSelectMusic.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index f2e3518aa8..8593fbc30b 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -671,8 +671,10 @@ void ScreenSelectMusic::CheckBackgroundRequests() return; } - /* Loading the rest can cause small skips, so don't do it until the wheel settles. */ - if( !m_MusicWheel.IsSettled() ) + /* Loading the rest can cause small skips, so don't do it until the wheel settles. + * Do load if we're transitioning out, though, so we don't miss starting the music + * for the options screen if a song is selected quickly. */ + if( !m_MusicWheel.IsSettled() && !m_Out.IsTransitioning() ) return; if( g_bBannerWaiting ) @@ -1187,6 +1189,13 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f ); } + /* If we're currently waiting on song assets, abort all except the music and + * start the music, so if we make a choice quickly before background requests + * come through, the music will still start. */ + g_bCDTitleWaiting = g_bBannerWaiting = false; + m_BackgroundLoader.Abort(); + CheckBackgroundRequests(); + StartTransitioning( SM_BeginFadingOut ); }