Send gamepad data on trigger button press

This commit is contained in:
Iwan Timmer
2017-09-02 18:56:56 +02:00
parent b6b47d3004
commit a4e19af04f

View File

@@ -243,6 +243,7 @@ static bool evdev_handle_event(struct input_event *ev, struct input_device *dev)
mouseCode = BUTTON_RIGHT;
break;
default:
gamepadModified = true;
if (dev->map == NULL)
break;
else if (index == dev->map->btn_a)
@@ -279,9 +280,8 @@ static bool evdev_handle_event(struct input_event *ev, struct input_device *dev)
if (mouseCode != 0) {
LiSendMouseButtonEvent(ev->value?BUTTON_ACTION_PRESS:BUTTON_ACTION_RELEASE, mouseCode);
gamepadModified = false;
} else if (gamepadCode != 0) {
gamepadModified = true;
if (ev->value)
dev->buttonFlags |= gamepadCode;
else