mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 06:11:36 +00:00
Send gamepad data on trigger button press
This commit is contained in:
+2
-2
@@ -243,6 +243,7 @@ static bool evdev_handle_event(struct input_event *ev, struct input_device *dev)
|
|||||||
mouseCode = BUTTON_RIGHT;
|
mouseCode = BUTTON_RIGHT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
gamepadModified = true;
|
||||||
if (dev->map == NULL)
|
if (dev->map == NULL)
|
||||||
break;
|
break;
|
||||||
else if (index == dev->map->btn_a)
|
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) {
|
if (mouseCode != 0) {
|
||||||
LiSendMouseButtonEvent(ev->value?BUTTON_ACTION_PRESS:BUTTON_ACTION_RELEASE, mouseCode);
|
LiSendMouseButtonEvent(ev->value?BUTTON_ACTION_PRESS:BUTTON_ACTION_RELEASE, mouseCode);
|
||||||
|
gamepadModified = false;
|
||||||
} else if (gamepadCode != 0) {
|
} else if (gamepadCode != 0) {
|
||||||
gamepadModified = true;
|
|
||||||
|
|
||||||
if (ev->value)
|
if (ev->value)
|
||||||
dev->buttonFlags |= gamepadCode;
|
dev->buttonFlags |= gamepadCode;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user