Re: [AD] [WIN] mouse acceleration

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:

> - the default parameters are modified to achieve a greater acceleration,
> especially in high res modes: respectively 5 (picked out this one from
> SVGAlib 1.4.3), 16 and 3 (Javier's 2 was a little too slow),

why not let set_gfx_mode() set the mouse accelleration factor according to
the screen dimentions? you can calculate the mouse accel factor like:

mouse_accel = sqrt(screen_x*screen_y) / 250

which for a screen mode of 800x600 will give an mouse_accel = 2.77 ~ 3.
for 1280x1024: 4.57 ~ 5
for 320x200: 1.01 ~ 1

and just use one max treshold rather than two tresholds perhaps.
just an idea... i think this will give a better feeling when using the
mouse.

-henrik




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/