Merge pull request #17 from pugmajere/accel

Reset the acceleration timer each time it expires.
pull/365/head
Gergely Nagy 7 years ago committed by GitHub
commit 560cfd350c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -62,9 +62,11 @@ void MouseKeys_::loopHook(bool postClear) {
int8_t moveX = 0, moveY = 0;
if (millis() >= accelEndTime) {
if (MouseWrapper.accelStep < 255 - accelSpeed)
if (MouseWrapper.accelStep < 255 - accelSpeed) {
MouseWrapper.accelStep += accelSpeed;
}
accelEndTime = millis() + accelDelay;
}
if (mouseMoveIntent & KEY_MOUSE_UP)
moveY = -speed;

Loading…
Cancel
Save