KEYMAPPER: Allow joystick half axes to be remapped
This commit is contained in:
parent
eea70a3c8c
commit
2177e685b7
14 changed files with 233 additions and 104 deletions
|
@ -148,7 +148,12 @@ Keymap::ActionArray Keymap::getMappedActions(const Event &event) const {
|
|||
}
|
||||
case EVENT_JOYBUTTON_DOWN:
|
||||
case EVENT_JOYBUTTON_UP: {
|
||||
HardwareInput hardwareInput = HardwareInput::createJoystick("", event.joystick.button, "");
|
||||
HardwareInput hardwareInput = HardwareInput::createJoystickButton("", event.joystick.button, "");
|
||||
return _hwActionMap[hardwareInput];
|
||||
}
|
||||
case EVENT_JOYAXIS_MOTION: {
|
||||
bool positiveHalf = event.joystick.position >= 0;
|
||||
HardwareInput hardwareInput = HardwareInput::createJoystickHalfAxis("", event.joystick.axis, positiveHalf, "");
|
||||
return _hwActionMap[hardwareInput];
|
||||
}
|
||||
case EVENT_CUSTOM_BACKEND_HARDWARE: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue