mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-16 22:01:11 +00:00
Fix re-plugging of input devices present when the stream started. Fix scroll wheel and backwards scrolling issue in common-c
This commit is contained in:
+7
-3
@@ -236,11 +236,15 @@ static void input_remove(int devindex) {
|
|||||||
if (fdindex != numFds && numFds > 0) {
|
if (fdindex != numFds && numFds > 0) {
|
||||||
memcpy(&fds[fdindex], &fds[numFds], sizeof(struct pollfd));
|
memcpy(&fds[fdindex], &fds[numFds], sizeof(struct pollfd));
|
||||||
if (numFds == udev_fdindex)
|
if (numFds == udev_fdindex)
|
||||||
udev_fdindex = numFds;
|
udev_fdindex = fdindex;
|
||||||
|
else if (numFds == sig_fdindex)
|
||||||
|
sig_fdindex = fdindex;
|
||||||
else {
|
else {
|
||||||
for (int i=0;i<numDevices;i++) {
|
for (int i=0;i<numDevices;i++) {
|
||||||
if (devices[i].fdindex == numFds)
|
if (devices[i].fdindex == numFds) {
|
||||||
devices[i].fdindex = fdindex;
|
devices[i].fdindex = fdindex;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -483,7 +487,7 @@ static bool input_handle_event(struct input_event *ev, struct input_device *dev)
|
|||||||
case REL_Y:
|
case REL_Y:
|
||||||
dev->mouseDeltaY = ev->value;
|
dev->mouseDeltaY = ev->value;
|
||||||
break;
|
break;
|
||||||
case REL_Z:
|
case REL_WHEEL:
|
||||||
dev->mouseScroll = ev->value;
|
dev->mouseScroll = ev->value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
Submodule third_party/moonlight-common-c updated: a5f59d206e...678afd9c30
Reference in New Issue
Block a user