diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 1a55f6c82e..664a04f27c 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -949,6 +949,9 @@ void ScreenSelectMusic::ChangeDifficulty( PlayerNumber pn, int dir ) case TYPE_RANDOM: case TYPE_ROULETTE: case TYPE_LEAP: + /* XXX: We could be on a music or course sort, or even one with both; we don't + * really know which difficulty to change. Maybe the two difficulties should be + * linked ... */ if( GAMESTATE->ChangeDifficulty( pn, dir ) ) { if( dir < 0 ) @@ -1228,13 +1231,10 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn ) m_PaneDisplay[pn].SetFromGameState(); } -void ScreenSelectMusic::SwitchToPreferredDifficulty() +void ScreenSelectMusic::SwitchToPreferredSongDifficulty() { - FOREACH_PlayerNumber( p ) + FOREACH_HumanPlayer( p ) { - if( !GAMESTATE->IsHumanPlayer( PlayerNumber(p) ) ) - continue; - /* Find the closest match to the user's preferred difficulty. */ int CurDifference = -1; for( unsigned i=0; iGetCurrentStyleDef()->m_StepsType ); - SwitchToPreferredDifficulty(); + SwitchToPreferredSongDifficulty(); /* Short delay before actually showing these, so they don't show * up when scrolling fast. It'll still show up in "slow" scrolling, diff --git a/stepmania/src/ScreenSelectMusic.h b/stepmania/src/ScreenSelectMusic.h index 240feeb6cb..56dc4ab617 100644 --- a/stepmania/src/ScreenSelectMusic.h +++ b/stepmania/src/ScreenSelectMusic.h @@ -61,7 +61,7 @@ protected: void ChangeDifficulty( PlayerNumber pn, int dir ); void AfterNotesChange( PlayerNumber pn ); - void SwitchToPreferredDifficulty(); + void SwitchToPreferredSongDifficulty(); void AfterMusicChange(); void SortOrderChanged();