Fix music wheel weirdness:

tap Left + tap Right would sometimes jump 2 songs in one direction
wheel stuck spinning if button release while wheel is flying_off_before_sort or flying_off_after_sort
This commit is contained in:
Chris Danford
2004-01-11 09:42:37 +00:00
parent 7237f1012e
commit 4fd2111fda
2 changed files with 69 additions and 15 deletions
+12 -5
View File
@@ -1418,8 +1418,18 @@ void MusicWheel::Move(int n)
/* If we're not selecting, discard this. We won't ignore it; we'll
* get called again every time the key is repeated. */
if( m_WheelState != STATE_SELECTING_MUSIC )
return;
/* Still process Move(0) so we sometimes continue moving immediate
* after the sort change finished and before the repeat event causes a
* Move(0). -Chris */
switch( m_WheelState )
{
case STATE_SELECTING_MUSIC:
case STATE_FLYING_OFF_BEFORE_NEXT_SORT:
case STATE_FLYING_ON_AFTER_NEXT_SORT:
break;
default:
return; // don't continue
}
if(m_Moving != 0 && n == 0 && m_TimeBeforeMovingBegins == 0)
{
@@ -1437,9 +1447,6 @@ void MusicWheel::Move(int n)
m_TimeBeforeMovingBegins = 1/4.0f;
m_SpinSpeed = float(PREFSMAN->m_iMusicWheelSwitchSpeed);
m_Moving = n;
if( fabsf(m_fPositionOffsetFromSelection) > 0.5f ) // wheel is very busy spinning
return;
if(m_Moving)
ChangeMusic(m_Moving);