Clear the report at the end of a move mouse or scroll mouse macro
This commit is contained in:
@@ -318,16 +318,32 @@ bool processMouseButtonAction(void)
|
|||||||
|
|
||||||
bool processMoveMouseAction(void)
|
bool processMoveMouseAction(void)
|
||||||
{
|
{
|
||||||
MacroMouseReport.x = currentMacroAction.moveMouse.x;
|
static bool inMotion;
|
||||||
MacroMouseReport.y = currentMacroAction.moveMouse.y;
|
|
||||||
return false;
|
if (inMotion) {
|
||||||
|
memset(&MacroMouseReport, 0, sizeof MacroMouseReport);
|
||||||
|
inMotion = false;
|
||||||
|
} else {
|
||||||
|
MacroMouseReport.x = currentMacroAction.moveMouse.x;
|
||||||
|
MacroMouseReport.y = currentMacroAction.moveMouse.y;
|
||||||
|
inMotion = true;
|
||||||
|
}
|
||||||
|
return inMotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool processScrollMouseAction(void)
|
bool processScrollMouseAction(void)
|
||||||
{
|
{
|
||||||
MacroMouseReport.wheelX = currentMacroAction.scrollMouse.x;
|
static bool inMotion;
|
||||||
MacroMouseReport.wheelY = currentMacroAction.scrollMouse.y;
|
|
||||||
return false;
|
if (inMotion) {
|
||||||
|
memset(&MacroMouseReport, 0, sizeof MacroMouseReport);
|
||||||
|
inMotion = false;
|
||||||
|
} else {
|
||||||
|
MacroMouseReport.wheelX = currentMacroAction.scrollMouse.x;
|
||||||
|
MacroMouseReport.wheelY = currentMacroAction.scrollMouse.y;
|
||||||
|
inMotion = true;
|
||||||
|
}
|
||||||
|
return inMotion;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool processTextAction(void)
|
bool processTextAction(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user