mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-01 23:35:47 +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:
parent
3e543c95f6
commit
9bf1ad75e8
10
src/input.c
10
src/input.c
@ -236,11 +236,15 @@ static void input_remove(int devindex) {
|
||||
if (fdindex != numFds && numFds > 0) {
|
||||
memcpy(&fds[fdindex], &fds[numFds], sizeof(struct pollfd));
|
||||
if (numFds == udev_fdindex)
|
||||
udev_fdindex = numFds;
|
||||
udev_fdindex = fdindex;
|
||||
else if (numFds == sig_fdindex)
|
||||
sig_fdindex = fdindex;
|
||||
else {
|
||||
for (int i=0;i<numDevices;i++) {
|
||||
if (devices[i].fdindex == numFds)
|
||||
if (devices[i].fdindex == numFds) {
|
||||
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:
|
||||
dev->mouseDeltaY = ev->value;
|
||||
break;
|
||||
case REL_Z:
|
||||
case REL_WHEEL:
|
||||
dev->mouseScroll = ev->value;
|
||||
break;
|
||||
}
|
||||
|
2
third_party/moonlight-common-c
vendored
2
third_party/moonlight-common-c
vendored
@ -1 +1 @@
|
||||
Subproject commit a5f59d206e6ad93ae3bbf2a5672ee319d19cb455
|
||||
Subproject commit 678afd9c300ae4591aa53e3bbf0e14783803671e
|
Loading…
x
Reference in New Issue
Block a user