Subversion Repositories Kolibri OS

Rev

Rev 5966 | Rev 6230 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5966 Rev 5986
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 5966 $
8
$Revision: 5986 $
9
 
9
 
10
 
10
 
Line 549... Line 549...
549
        call    wakeup_osloop
549
        call    wakeup_osloop
550
        ret
550
        ret
551
endp
551
endp
Line 552... Line 552...
552
 
552
 
553
;-----------------------------------------------------------------------------
553
;-----------------------------------------------------------------------------
554
; 3 = x^2 /2
554
; 3 = (x+1)^2 /4
555
; 2 = (x+1)^2 /4
555
; 2 = (x+2)^2 /8
556
; 1 = (x+2)^2 /8
556
; 1 = (x+3)^2 /16
557
align 4
557
align 4
558
mouse_acceleration:
558
mouse_acceleration:
559
        cmp     [mouse_delay], 0
559
        cmp     [mouse_delay], 0
560
        jz      .end
560
        jz      .end
561
        push    eax
561
        push    eax
562
@@:
562
@@:
563
        neg     eax
563
        neg     eax
-
 
564
        jl      @b
564
        jl      @b
565
        inc     eax
565
        cmp     [mouse_delay], 3
566
        cmp     [mouse_delay], 3
566
        adc     eax, 0
567
        adc     eax, 0
567
        cmp     [mouse_delay], 2
568
        cmp     [mouse_delay], 2
568
        adc     eax, 0
569
        adc     eax, 0
569
        mul     al
570
        mul     al
570
        shr     eax, 1
-
 
571
        adc     eax, 0
571
        shr     eax, 2
572
        cmp     [mouse_delay], 2
572
        cmp     [mouse_delay], 2
573
        jz      .2
573
        jz      .2
574
        jnc     .3
574
        jnc     .3
575
        shr     eax, 1
575
        shr     eax, 1