From 14d055bbdb864e6cd4f0e3577fb03a6a0ff1516b Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 3 Oct 2003 04:18:17 +0000 Subject: [PATCH] don't play change sound on Left/Right when row has 0 choices --- stepmania/src/ScreenOptions.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index f77d1b2e7b..21771fb0af 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -769,6 +769,16 @@ void ScreenOptions::MenuStart( PlayerNumber pn ) void ScreenOptions::ChangeValue( PlayerNumber pn, int iDelta ) { + int iCurRow = m_iCurrentRow[pn]; + OptionRow &row = m_OptionRow[iCurRow]; + + if( iCurRow == m_iNumOptionRows ) // EXIT is selected + return; // don't allow a move + + const int iNumOptions = row.choices.size(); + if( iNumOptions <= 1 ) // 1 or 0 + return; // don't change, don't play sound + for( int p=0; p