From d785851eb6b9213c8d7131a8df49f506e9ba7e87 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Jun 2010 18:51:06 -0500 Subject: [PATCH] if a preferred song group is set via gamecommand, and [MusicWheel] UseSectionsWithPreferredGroup=true, then jump to the first song in the group when entering SSMusic instead of staying on the first item in the wheel. --- src/MusicWheel.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index 9e04a454cc..29ab02ea8f 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -175,8 +175,16 @@ void MusicWheel::BeginScreen() if(GAMESTATE->m_sPreferredSongGroup != GROUP_ALL) { - // if we have a preferred song group set, we should go there. + // If a preferred song group is set, open the group and select the + // first song in the group. -aj + if(!GAMESTATE->IsCourseMode()) + { + vector vTemp = SONGMAN->GetSongs(GAMESTATE->m_sPreferredSongGroup); + ASSERT(vTemp.size() > 0); + GAMESTATE->m_pCurSong.Set(vTemp[0]); + }; SetOpenSection(GAMESTATE->m_sPreferredSongGroup); + SelectSongOrCourse(); } else if( !SelectSongOrCourse() ) {