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 )
|
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;
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
case IET_FAST_REPEAT: fScale *= 16; break;
|
fScale *= 10;
|
||||||
|
else
|
||||||
|
fScale *= 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !bIncrease )
|
if( !bIncrease )
|
||||||
|
|||||||
@@ -1474,13 +1474,12 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
{
|
{
|
||||||
fDelta /= 20; // .001 bpm
|
fDelta /= 20; // .001 bpm
|
||||||
}
|
}
|
||||||
|
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||||
|
{
|
||||||
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
|
fDelta *= 10;
|
||||||
else
|
else
|
||||||
{
|
fDelta *= 40;
|
||||||
switch( input.type )
|
|
||||||
{
|
|
||||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
|
||||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float fNewBPM = fBPM + fDelta;
|
float fNewBPM = fBPM + fDelta;
|
||||||
@@ -1502,13 +1501,12 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
{
|
{
|
||||||
fDelta /= 20; /* 1ms */
|
fDelta /= 20; /* 1ms */
|
||||||
}
|
}
|
||||||
|
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||||
|
{
|
||||||
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
|
fDelta *= 10;
|
||||||
else
|
else
|
||||||
{
|
fDelta *= 40;
|
||||||
switch( input.type )
|
|
||||||
{
|
|
||||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
|
||||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for( i=0; i<m_pSong->m_Timing.m_StopSegments.size(); 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 */
|
fDelta /= 20; /* 1ms */
|
||||||
}
|
}
|
||||||
|
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||||
|
{
|
||||||
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
|
fDelta *= 10;
|
||||||
else
|
else
|
||||||
{
|
fDelta *= 40;
|
||||||
switch( input.type )
|
|
||||||
{
|
|
||||||
case IET_SLOW_REPEAT: fDelta *= 10; break;
|
|
||||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
m_pSong->m_Timing.m_fBeat0OffsetInSeconds += fDelta;
|
m_pSong->m_Timing.m_fBeat0OffsetInSeconds += fDelta;
|
||||||
(fDelta>0 ? m_soundValueIncrease : m_soundValueDecrease).Play();
|
(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_DOWN: fDelta = -0.02f; break;
|
||||||
case EDIT_BUTTON_SAMPLE_LENGTH_UP: 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;
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
case IET_FAST_REPEAT: fDelta *= 40; break;
|
fDelta *= 10;
|
||||||
|
else
|
||||||
|
fDelta *= 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( EditB == EDIT_BUTTON_SAMPLE_LENGTH_DOWN || EditB == EDIT_BUTTON_SAMPLE_LENGTH_UP )
|
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 */
|
fOffsetDelta /= 20; /* 1ms */
|
||||||
}
|
}
|
||||||
|
else if( input.type == IET_SLOW_REPEAT || input.type == IET_FAST_REPEAT )
|
||||||
|
{
|
||||||
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
|
fOffsetDelta *= 10;
|
||||||
else
|
else
|
||||||
{
|
fOffsetDelta *= 40;
|
||||||
switch( input.type )
|
|
||||||
{
|
|
||||||
case IET_SLOW_REPEAT: fOffsetDelta *= 10; break;
|
|
||||||
case IET_FAST_REPEAT: fOffsetDelta *= 40; break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pSong->m_Timing.m_fBeat0OffsetInSeconds += fOffsetDelta;
|
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) ||
|
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.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);
|
LOG->Trace("Player %i went back", input.MenuI.player+1);
|
||||||
BeginBackingOutFromGameplay();
|
BeginBackingOutFromGameplay();
|
||||||
|
|||||||
@@ -182,8 +182,13 @@ bool ScreenSyncOverlay::OverlayInput( const InputEventPlus &input )
|
|||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_RELEASE: fDelta *= 0; break;
|
case IET_RELEASE: fDelta *= 0; break;
|
||||||
case IET_SLOW_REPEAT: fDelta *= 0; break;
|
case IET_SLOW_REPEAT:
|
||||||
case IET_FAST_REPEAT: fDelta *= 10; break;
|
case IET_FAST_REPEAT:
|
||||||
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
|
fDelta *= 0;
|
||||||
|
else
|
||||||
|
fDelta *= 10;
|
||||||
|
fDelta *= 10; break;
|
||||||
}
|
}
|
||||||
if( GAMESTATE->m_pCurSong != NULL )
|
if( GAMESTATE->m_pCurSong != NULL )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user