mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 06:11:03 +00:00
Don't send no-op mouse move and scroll events
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user