trying to fix menu problems with analog controllers

This commit is contained in:
Thomas Jentzsch 2021-12-15 12:26:00 +01:00 committed by Christian Speckner
parent 390c69fb36
commit ae53d42c79
1 changed files with 2 additions and 3 deletions

View File

@ -838,11 +838,10 @@ void PhysicalJoystickHandler::handleRegularAxisEvent(const PhysicalJoystickPtr j
// Now filter out consecutive, similar values // Now filter out consecutive, similar values
// (only pass on the event if the state has changed) // (only pass on the event if the state has changed)
if(value != j->axisLastValue[axis]) if(value != j->axisLastValue[axis])
{
myHandler.overlay().handleJoyAxisEvent(stick, JoyAxis(axis), convertAxisValue(value), button); myHandler.overlay().handleJoyAxisEvent(stick, JoyAxis(axis), convertAxisValue(value), button);
}
} }
else
myHandler.overlay().handleJoyAxisEvent(stick, JoyAxis(axis), JoyDir::NONE, button);
j->axisLastValue[axis] = value; j->axisLastValue[axis] = value;
} }
#endif #endif