remove IET_FAST_REPEAT
This commit is contained in:
@@ -235,7 +235,7 @@ void InputFilter::Update( float fDeltaTime )
|
||||
/* Generate IET_FIRST_PRESS and IET_RELEASE events that were delayed. */
|
||||
CheckButtonChange( bs, di, now );
|
||||
|
||||
/* Generate IET_FAST_REPEAT and IET_SLOW_REPEAT events. */
|
||||
/* Generate IET_SLOW_REPEAT events. */
|
||||
if( !bs.m_bLastReportedHeld )
|
||||
{
|
||||
// If the key isn't pressed, and hasn't been pressed for a while (so debouncing
|
||||
|
||||
@@ -10,10 +10,9 @@ enum InputEventType
|
||||
/* The device was just pressed. */
|
||||
IET_FIRST_PRESS,
|
||||
|
||||
/* The device is auto-repeating. These events are guaranteed to be sent only between
|
||||
/* The device is auto-repeating. This event is guaranteed to be sent only between
|
||||
* IET_FIRST_PRESS and IET_RELEASE pairs. */
|
||||
IET_SLOW_REPEAT,
|
||||
IET_FAST_REPEAT,
|
||||
|
||||
/* The device is no longer pressed. Exactly one IET_RELEASE event will be sent
|
||||
* for each IET_FIRST_PRESS. */
|
||||
|
||||
@@ -162,7 +162,7 @@ void Screen::MenuSelect( const InputEventPlus &input ) { if(input.type==IET_FIRS
|
||||
|
||||
void Screen::MenuBack( const InputEventPlus &input )
|
||||
{
|
||||
if(!PREFSMAN->m_bDelayedBack || input.type==IET_SLOW_REPEAT || input.type==IET_FAST_REPEAT)
|
||||
if(!PREFSMAN->m_bDelayedBack || input.type==IET_SLOW_REPEAT )
|
||||
MenuBack( input.MenuI.player) ;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,6 @@ void Screen::Input( const InputEventPlus &input )
|
||||
{
|
||||
case IET_FIRST_PRESS:
|
||||
case IET_SLOW_REPEAT:
|
||||
case IET_FAST_REPEAT:
|
||||
break; /* OK */
|
||||
default:
|
||||
return; // don't care
|
||||
|
||||
@@ -131,7 +131,7 @@ void ScreenCenterImage::Input( const InputEventPlus &input )
|
||||
|
||||
if( input.DeviceI.level < 0 )
|
||||
{
|
||||
if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fScale *= 10;
|
||||
|
||||
@@ -1474,7 +1474,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fDelta /= 20; // .001 bpm
|
||||
}
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
else if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
@@ -1501,7 +1501,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fDelta /= 20; /* 1ms */
|
||||
}
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
else if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
@@ -1545,7 +1545,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fDelta /= 20; /* 1ms */
|
||||
}
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
else if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
@@ -1571,7 +1571,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
case EDIT_BUTTON_SAMPLE_LENGTH_UP: fDelta = +0.02f; break;
|
||||
}
|
||||
|
||||
if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 10;
|
||||
@@ -1964,7 +1964,6 @@ void ScreenEdit::InputRecord( const InputEventPlus &input, EditButton EditB )
|
||||
}
|
||||
break;
|
||||
case IET_SLOW_REPEAT:
|
||||
case IET_FAST_REPEAT:
|
||||
case IET_RELEASE:
|
||||
// don't add or extend holds here; we do it in Update()
|
||||
break;
|
||||
@@ -2060,7 +2059,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
||||
{
|
||||
fOffsetDelta /= 20; /* 1ms */
|
||||
}
|
||||
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
else if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fOffsetDelta *= 10;
|
||||
|
||||
@@ -2118,7 +2118,7 @@ void ScreenGameplay::Input( const InputEventPlus &input )
|
||||
if( input.MenuI.button == MENU_BUTTON_BACK && !BACK_GIVES_UP )
|
||||
{
|
||||
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_SLOW_REPEAT) ||
|
||||
(input.DeviceI.device!=DEVICE_KEYBOARD && INPUTFILTER->GetSecsHeld(input.DeviceI) >= 1.0f)) )
|
||||
{
|
||||
LOG->Trace("Player %i went back", input.MenuI.player+1);
|
||||
|
||||
@@ -234,7 +234,7 @@ static bool IsAxis( const DeviceInput& DeviceI )
|
||||
|
||||
void ScreenMapControllers::Input( const InputEventPlus &input )
|
||||
{
|
||||
if( input.type != IET_FIRST_PRESS && input.type != IET_SLOW_REPEAT && input.type != IET_FAST_REPEAT )
|
||||
if( input.type != IET_FIRST_PRESS && input.type != IET_SLOW_REPEAT )
|
||||
return; // ignore
|
||||
if( IsTransitioning() )
|
||||
return; // ignore
|
||||
|
||||
@@ -92,7 +92,7 @@ void ScreenNetSelectBase::Input( const InputEventPlus &input )
|
||||
if( m_In.IsTransitioning() || m_Out.IsTransitioning() )
|
||||
return;
|
||||
|
||||
if( (input.type != IET_FIRST_PRESS) && (input.type != IET_SLOW_REPEAT) && (input.type != IET_FAST_REPEAT ) )
|
||||
if( input.type != IET_FIRST_PRESS && input.type != IET_SLOW_REPEAT )
|
||||
return;
|
||||
|
||||
bool bHoldingCtrl =
|
||||
|
||||
@@ -123,7 +123,7 @@ void ScreenNetSelectMusic::Input( const InputEventPlus &input )
|
||||
return;
|
||||
}
|
||||
|
||||
if( (input.type != IET_FIRST_PRESS) && (input.type != IET_SLOW_REPEAT) && (input.type != IET_FAST_REPEAT ) )
|
||||
if( input.type != IET_FIRST_PRESS && input.type != IET_SLOW_REPEAT )
|
||||
return;
|
||||
|
||||
bool bHoldingCtrl =
|
||||
|
||||
@@ -1217,7 +1217,7 @@ void ScreenOptions::MenuUpDown( const InputEventPlus &input, int iDir )
|
||||
ASSERT( iDir == -1 || iDir == +1 );
|
||||
PlayerNumber pn = input.MenuI.player;
|
||||
|
||||
if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||
if( input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
/* If down is pressed, don't allow up to repeat, and vice versa. This prevents
|
||||
* holding both up and down from toggling repeatedly in-place. */
|
||||
|
||||
@@ -301,8 +301,7 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
||||
if( !m_bAllowOptionsMenu )
|
||||
return; /* not allowed */
|
||||
|
||||
if( !m_bAllowOptionsMenuRepeat &&
|
||||
(input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT ))
|
||||
if( !m_bAllowOptionsMenuRepeat && input.type == IET_SLOW_REPEAT )
|
||||
{
|
||||
return; /* not allowed yet */
|
||||
}
|
||||
|
||||
@@ -183,12 +183,10 @@ bool ScreenSyncOverlay::OverlayInput( const InputEventPlus &input )
|
||||
{
|
||||
case IET_RELEASE: fDelta *= 0; 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 )
|
||||
{
|
||||
@@ -209,8 +207,11 @@ 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:
|
||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||
fDelta *= 0;
|
||||
else
|
||||
fDelta *= 10;
|
||||
}
|
||||
|
||||
switch( a )
|
||||
|
||||
@@ -187,7 +187,6 @@ void ScreenTextEntry::Input( const InputEventPlus &input )
|
||||
{
|
||||
case IET_FIRST_PRESS:
|
||||
case IET_SLOW_REPEAT:
|
||||
case IET_FAST_REPEAT:
|
||||
BackspaceInAnswer();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user