Re: [AD] mouse bug

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


from dx sdk:
"The data returned for the x-axis and y-axis of a mouse indicates the
movement of the mouse itself, not the cursor. The units of measurement are
based on the values returned by the mouse hardware and have nothing to do
with pixels or any other form of screen measurement. Because Microsoft®
DirectInput® communicates directly with the mouse driver, the values for
mouse speed and acceleration set by the user in Control Panel do not affect
this data."

So, it is clear we must add acceleration in order to make it compatible with
dos, linux and even windows desktop =)
ok, that's clear, acceleration is a must by default, to the next point

> >Why not change the mouse mode from relative to absolute? This shouldn't
be
> >a problem regarding my "Inside DirectX" book. (Have no compiler avail.
> >right now).

What would be the difference? According to DX sdk help, both modes return
their results in mickeys, with no acceleration applied, and imho absolute is
even worse since:
"When the axis mode is set to absolute, the coordinates are simply a running
total of all relative motions received by DirectInput. The axis coordinates
are not initialized to any particular value when the device is acquired, so
your application should treat absolute values as relative to an unknown
origin. You can record the current absolute position whenever the device is
acquired and save it as the virtual origin. This virtual origin can then be
subtracted from subsequent absolute coordinates retrieved from the device to
compute the relative distance that the mouse has moved from the point of
acquisition."

so we should be doing many things just to get the same result as relative
mode



> >The scaling can be done via the set_mouse_speed() func, so this shouldn't
be
> >a big problem, either.
>
> The set_mouse_speed() would then call the aprop. dx funcs, of course.

What dx functions do that? =)



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