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,8 +62,10 @@ void MouseKeys_::loopHook(bool postClear) {
int8_t moveX = 0, moveY = 0; int8_t moveX = 0, moveY = 0;
if (millis() >= accelEndTime) { if (millis() >= accelEndTime) {
if (MouseWrapper.accelStep < 255 - accelSpeed) if (MouseWrapper.accelStep < 255 - accelSpeed) {
MouseWrapper.accelStep += accelSpeed; MouseWrapper.accelStep += accelSpeed;
}
accelEndTime = millis() + accelDelay;
} }
if (mouseMoveIntent & KEY_MOUSE_UP) if (mouseMoveIntent & KEY_MOUSE_UP)

Loading…
Cancel
Save