From 0e9525ce9a5dea756afd6231b58792636eefc2da Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Tue, 26 Jun 2018 15:59:51 -0700 Subject: [PATCH] Don't clear the whole report --- right/src/macros.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/right/src/macros.c b/right/src/macros.c index 558c4ea..97df053 100644 --- a/right/src/macros.c +++ b/right/src/macros.c @@ -321,7 +321,8 @@ bool processMoveMouseAction(void) static bool inMotion; if (inMotion) { - memset(&MacroMouseReport, 0, sizeof MacroMouseReport); + MacroMouseReport.x = 0; + MacroMouseReport.y = 0; inMotion = false; } else { MacroMouseReport.x = currentMacroAction.moveMouse.x; @@ -336,7 +337,8 @@ bool processScrollMouseAction(void) static bool inMotion; if (inMotion) { - memset(&MacroMouseReport, 0, sizeof MacroMouseReport); + MacroMouseReport.wheelX = 0; + MacroMouseReport.wheelY = 0; inMotion = false; } else { MacroMouseReport.wheelX = currentMacroAction.scrollMouse.x;