mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-02 22:06:10 +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;
|
||||
}
|
||||
|
||||
if (deltaX == 0 && deltaY == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
holder = malloc(sizeof(*holder));
|
||||
if (holder == NULL) {
|
||||
return -1;
|
||||
@@ -675,6 +679,10 @@ int LiSendHighResScrollEvent(short scrollAmount) {
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (scrollAmount == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
holder = malloc(sizeof(*holder));
|
||||
if (holder == NULL) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user