Fixed binding the D-PAD on the 8BitDo M30 controller

This commit is contained in:
Sam Lantinga
2020-03-13 13:05:40 -07:00
parent cb2f78b12d
commit de2001eeee
2 changed files with 16 additions and 17 deletions

View File

@@ -473,7 +473,7 @@ WatchJoystick(SDL_Joystick * joystick)
if (!pAxisState->m_bMoving) {
Sint16 nInitialValue;
pAxisState->m_bMoving = SDL_JoystickGetAxisInitialState(joystick, event.jaxis.axis, &nInitialValue);
pAxisState->m_nLastValue = nInitialValue;
pAxisState->m_nLastValue = nValue;
pAxisState->m_nStartingValue = nInitialValue;
pAxisState->m_nFarthestValue = nInitialValue;
} else if (SDL_abs(nValue - pAxisState->m_nLastValue) <= MAX_ALLOWED_JITTER) {