From 8900a2a9ba6f0d119af253b02a51b74c9525b2de Mon Sep 17 00:00:00 2001 From: pathoswithin Date: Fri, 18 Dec 2015 20:33:11 +0000 Subject: [PATCH] Smoother mouse acceleration git-svn-id: svn://kolibrios.org@5986 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/hid/mousedrv.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/trunk/hid/mousedrv.inc b/kernel/trunk/hid/mousedrv.inc index 28123f2a9b..7734ff0621 100644 --- a/kernel/trunk/hid/mousedrv.inc +++ b/kernel/trunk/hid/mousedrv.inc @@ -551,9 +551,9 @@ proc set_mouse_data stdcall uses edx, BtnState:dword, XMoving:dword, YMoving:dwo endp ;----------------------------------------------------------------------------- -; 3 = x^2 /2 -; 2 = (x+1)^2 /4 -; 1 = (x+2)^2 /8 +; 3 = (x+1)^2 /4 +; 2 = (x+2)^2 /8 +; 1 = (x+3)^2 /16 align 4 mouse_acceleration: cmp [mouse_delay], 0 @@ -562,13 +562,13 @@ mouse_acceleration: @@: neg eax jl @b + inc eax cmp [mouse_delay], 3 adc eax, 0 cmp [mouse_delay], 2 adc eax, 0 mul al - shr eax, 1 - adc eax, 0 + shr eax, 2 cmp [mouse_delay], 2 jz .2 jnc .3