mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +00:00
Don't send no-op mouse move and scroll events
This commit is contained in:
parent
7b56ab755d
commit
f8ffb30e1f
@ -459,6 +459,10 @@ int LiSendMouseMoveEvent(short deltaX, short deltaY) {
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (deltaX == 0 && deltaY == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
holder = malloc(sizeof(*holder));
|
holder = malloc(sizeof(*holder));
|
||||||
if (holder == NULL) {
|
if (holder == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -675,6 +679,10 @@ int LiSendHighResScrollEvent(short scrollAmount) {
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (scrollAmount == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
holder = malloc(sizeof(*holder));
|
holder = malloc(sizeof(*holder));
|
||||||
if (holder == NULL) {
|
if (holder == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user