Browse Source

fixed MOUSEKEY_INERTIA on AVR (#19096)

Co-authored-by: Selene ToyKeeper <git@toykeeper.net>
pull/19102/head
Selene ToyKeeper 1 year ago
committed by GitHub
parent
commit
31fb55ae7b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      quantum/mousekey.c

+ 1
- 1
quantum/mousekey.c View File

@ -129,7 +129,7 @@ static int8_t move_unit(uint8_t axis) {
// x**2 acceleration (quadratic, more precise for short movements)
int16_t percent = (inertia << 8) / mk_time_to_max;
percent = (percent * percent) >> 8;
percent = ((int32_t)percent * percent) >> 8;
if (inertia < 0) percent = -percent;
// unit = sign(inertia) + (percent of max speed)


Loading…
Cancel
Save