KEYMAPPER: Fix size of _joystickAxisPreviouslyPressed array

It should include all the valid axis defined in defaultJoystickAxes so the size should now be 8

The 2 extra since the previous size (6) is due to the addition of support for HAT_X and HAT_Y axis.
This fix allows the HAT_X+/- and HAT_Y/+- to operate as valid incoming events when mapped to an action (see Keymapper::convertToIncomingEventType())
This commit is contained in:
antoniou79 2023-08-14 14:06:29 +03:00
parent f2e84b4bee
commit 948f004a78

View File

@ -160,7 +160,7 @@ private:
KeymapArray _keymaps;
bool _joystickAxisPreviouslyPressed[6];
bool _joystickAxisPreviouslyPressed[8]; // size should match the number of valid axis entries of defaultJoystickAxes (in hardware-input.cpp)
Keymap::KeymapMatch getMappedActions(const Event &event, Keymap::ActionArray &actions, Keymap::KeymapType keymapType) const;
Event executeAction(const Action *act, const Event &incomingEvent);