From 31a1f078ea08cf5319ca45bf7dc99677b2b11546 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 18 Sep 2005 11:41:44 +0000 Subject: [PATCH] Clarify the select path: when select is pressed, stop the wheel immediately. Previously, if select was pressed while holding left/right, it would stop on the next repeat. That's OK, since the button repeat is much faster than the wheel, but it's confusing. --- stepmania/src/ScreenSelectMusic.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index b3a4b3b33f..2cc93ddcef 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -743,9 +743,15 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) LoadHelpText(); - bool bSelectIsPressed = - SELECT_MENU_AVAILABLE && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_SELECT) ); - if( bSelectIsPressed ) + if( input.MenuI.button == MENU_BUTTON_SELECT ) + { + if( input.type == IET_FIRST_PRESS ) + m_MusicWheel.Move( 0 ); + + return; + } + + if( SELECT_MENU_AVAILABLE && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_SELECT) ) ) { if( input.type == IET_FIRST_PRESS ) { @@ -765,6 +771,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) return; } } + return; } switch( input.MenuI.button ) @@ -780,11 +787,8 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) bool bRightIsDown = false; FOREACH_EnabledPlayer( p ) { - if( !bSelectIsPressed ) - { - bLeftIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) ); - bRightIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) ); - } + bLeftIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) ); + bRightIsDown |= INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) ); } bool bBothDown = bLeftIsDown && bRightIsDown; @@ -793,6 +797,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) if( bNeitherDown ) { + /* Both buttons released. */ m_MusicWheel.Move( 0 ); } else if( bBothDown ) @@ -842,10 +847,6 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) break; } - - if( bSelectIsPressed ) - return; - // TRICKY: Do default processing of MenuLeft and MenuRight before detecting // codes. Do default processing of Start AFTER detecting codes. This gives us a // change to return if Start is part of a code because we don't want to process