IET_FAST_REPEAT is the same as IET_SLOW_REPEAT, sent instead
after the button has been held a while. It hasn't actually been a different repeat rate for a very long time, and was partially phased out a while ago. Now it's just used to see if the button has been held a while. Do that with GetSecsHeld instead.
This commit is contained in:
@@ -131,10 +131,12 @@ void ScreenCenterImage::Input( const InputEventPlus &input )
|
||||
|
||||
if( input.DeviceI.level < 0 )
|
||||
{
|
||||
switch( input.type )
|
||||
if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
{
|
||||
case IET_SLOW_REPEAT: fScale *= 4; break;
|
||||
case IET_FAST_REPEAT: fScale *= 16; break;
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fScale *= 10;
|
||||
else
|
||||
fScale *= 40;
|
||||
}
|
||||
|
||||
if( !bIncrease )
|
||||
|
||||
@@ -1474,13 +1474,12 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fDelta /= 20; // .001 bpm
|
||||
}
|
||||
else
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
{
|
||||
switch( input.type )
|
||||
{
|
||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
||||
}
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
else
|
||||
fDelta *= 40;
|
||||
}
|
||||
|
||||
float fNewBPM = fBPM + fDelta;
|
||||
@@ -1502,13 +1501,12 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fDelta /= 20; /* 1ms */
|
||||
}
|
||||
else
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
{
|
||||
switch( input.type )
|
||||
{
|
||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
||||
}
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
else
|
||||
fDelta *= 40;
|
||||
}
|
||||
unsigned i;
|
||||
for( i=0; i<m_pSong->m_Timing.m_StopSegments.size(); i++ )
|
||||
@@ -1547,13 +1545,12 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fDelta /= 20; /* 1ms */
|
||||
}
|
||||
else
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
{
|
||||
switch( input.type )
|
||||
{
|
||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
||||
}
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
else
|
||||
fDelta *= 40;
|
||||
}
|
||||
m_pSong->m_Timing.m_fBeat0OffsetInSeconds += fDelta;
|
||||
(fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play();
|
||||
@@ -1573,10 +1570,13 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
case EDIT_BUTTON_SAMPLE_LENGTH_DOWN: fDelta = -0.02f; break;
|
||||
case EDIT_BUTTON_SAMPLE_LENGTH_UP: fDelta = +0.02f; break;
|
||||
}
|
||||
switch( input.type )
|
||||
|
||||
if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
{
|
||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
else
|
||||
fDelta *= 40;
|
||||
}
|
||||
|
||||
if( EditB == EDIT_BUTTON_SAMPLE_LENGTH_DOWN || EditB == EDIT_BUTTON_SAMPLE_LENGTH_UP )
|
||||
@@ -2060,13 +2060,12 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fOffsetDelta /= 20; /* 1ms */
|
||||
}
|
||||
else
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
{
|
||||
switch( input.type )
|
||||
{
|
||||
case IET_SLOW_REPEAT: fOffsetDelta *= 10; break;
|
||||
case IET_FAST_REPEAT: fOffsetDelta *= 40; break;
|
||||
}
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fOffsetDelta *= 10;
|
||||
else
|
||||
fOffsetDelta *= 40;
|
||||
}
|
||||
|
||||
m_pSong->m_Timing.m_fBeat0OffsetInSeconds += fOffsetDelta;
|
||||
|
||||
@@ -2119,7 +2119,7 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
||||
{
|
||||
if( ((!PREFSMAN->m_bDelayedBack && input.type==IET_FIRST_PRESS) ||
|
||||
(input.DeviceI.device==DEVICE_KEYBOARD && (input.type==IET_SLOW_REPEAT||input.type==IET_FAST_REPEAT)) ||
|
||||
(input.DeviceI.device!=DEVICE_KEYBOARD && input.type==IET_FAST_REPEAT)) )
|
||||
(input.DeviceI.device!=DEVICE_KEYBOARD && INPUTFILTER->GetSecsHeld(input.DeviceI) >= 1.0f)) )
|
||||
{
|
||||
LOG->Trace("Player %i went back", input.MenuI.player+1);
|
||||
BeginBackingOutFromGameplay();
|
||||
|
||||
@@ -182,8 +182,13 @@ bool ScreenSyncOverlay::OverlayInput( const InputEventPlus &input )
|
||||
switch( input.type )
|
||||
{
|
||||
case IET_RELEASE: fDelta *= 0; break;
|
||||
case IET_SLOW_REPEAT: fDelta *= 0; break;
|
||||
case IET_FAST_REPEAT: fDelta *= 10; break;
|
||||
case IET_SLOW_REPEAT:
|
||||
case IET_FAST_REPEAT:
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 0;
|
||||
else
|
||||
fDelta *= 10;
|
||||
fDelta *= 10; break;
|
||||
}
|
||||
if( GAMESTATE->m_pCurSong != NULL )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user