diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 9ef65dc671..569fae3339 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -820,14 +820,6 @@ bool InputMapper::IsBeingPressed( const MenuInput &MenuI ) return false; } -bool InputMapper::IsBeingPressed( const StyleInput &StyleI, PlayerNumber pn, MultiPlayer mp ) -{ - GameInput GameI; - StyleToGame( StyleI, pn, GameI ); - return IsBeingPressed( GameI, mp ); -} - - float InputMapper::GetSecsHeld( const GameInput &GameI, MultiPlayer mp ) { float fMaxSecsHeld = 0; diff --git a/stepmania/src/InputMapper.h b/stepmania/src/InputMapper.h index f07546149c..5177b8e068 100644 --- a/stepmania/src/InputMapper.h +++ b/stepmania/src/InputMapper.h @@ -48,7 +48,6 @@ public: bool IsBeingPressed( const GameInput &GameI, MultiPlayer mp = MultiPlayer_INVALID, const DeviceInputList *pButtonState = NULL ); bool IsBeingPressed( const MenuInput &MenuI ); - bool IsBeingPressed( const StyleInput &StyleI, PlayerNumber pn, MultiPlayer mp = MultiPlayer_INVALID ); void ResetKeyRepeat( const GameInput &GameI ); void ResetKeyRepeat( const MenuInput &MenuI ); diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index d515dcad5a..326351fe59 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -542,6 +542,8 @@ void Player::Update( float fDeltaTime ) // TODO: Remove use of PlayerNumber. PlayerNumber pn = m_pPlayerState->m_PlayerNumber; + GameInput GameI; + INPUTMAPPER->StyleToGame( col, m_pPlayerState->m_PlayerNumber, GameI ); bool bIsHoldingButton = INPUTMAPPER->IsBeingPressed( col, pn ); // TODO: Make this work for non-human-controlled players @@ -620,7 +622,9 @@ void Player::Update( float fDeltaTime ) } else { - bIsHoldingButton = INPUTMAPPER->IsBeingPressed( iTrack, pn, m_pPlayerState->m_mp ); + GameInput GameI; + INPUTMAPPER->StyleToGame( iTrack, pn, GameI ); + bIsHoldingButton = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp ); } int iEndRow = iRow + tn.iDuration; @@ -1497,7 +1501,9 @@ void Player::CrossedMineRow( int iNoteRow, const RageTimer &now ) } else { - bool bIsDown = INPUTMAPPER->IsBeingPressed( t, pn, m_pPlayerState->m_mp ); + GameInput GameI; + INPUTMAPPER->StyleToGame( t, pn, GameI ); + bool bIsDown = INPUTMAPPER->IsBeingPressed( GameI, m_pPlayerState->m_mp ); if( bIsDown ) Step( t, iNoteRow, now, true, false ); } diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 2d53d3e141..709ac9dcc7 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -935,7 +935,9 @@ void ScreenEdit::Update( float fDeltaTime ) bool bButtonIsBeingPressed = false; for( int t=0; tGetCurrentStyle()->m_iColsPerPlayer; t++ ) // for each track { - if( INPUTMAPPER->IsBeingPressed(t, PLAYER_1) ) + GameInput GameI; + INPUTMAPPER->StyleToGame( t, PLAYER_1, GameI ); + if( INPUTMAPPER->IsBeingPressed(GameI) ) bButtonIsBeingPressed = true; }