Hi,
I used the function get_mouse_mickeys().
It should be a raw direct input, but it is affected by mouse acceleration, it reads more mickeys for the same distance when I move the mouse faster.
I tried to disable it (in win xp) through control panel with no success.
Is there a function that disables the acceleration ( or speed threshold? ) ?
mik
You will need to turn down the acceleration in the control panel.
If you want to add serial mice to your app, this is not the main pointer, i have code for that.
Turning down the acceleration in control panel let the mouse pointer work without acceleration, but the function get_mouse_mickeys() reads more mickeys when moving faster the mouse (same distance of course), that means maybe that low level acceleration is enabled or the operative system manipulate the data.
Is there a function that let me manipulate the speed or acceleration parameters ?
mik
I think that Direct Input does not return values with acceleration, at least not for fullscreen (I could be wrong, but I seem to remember this is the case). Because of this, there is some code that emulates acceleration in the allegro mouse driver for windows. As far as I remember this is not controlable.
You could tweak the mouse acceleration parameters and recompile allegro
#define MAF_DEFAULT 1 /* mouse acceleration parameters */ static int mouse_accel_fact = MAF_DEFAULT; static int mouse_accel_mult = MAF_DEFAULT; static int mouse_accel_thr1 = 5 * 5; static int mouse_accel_thr2 = 16 * 16;
Or you could update the acceleration code to make it tweakable (with some config entry probably). Or even better implement a driver that uses windows events (and not direct input) - I think this has been proposed but nobody was up to the task (I tried but did not get far - good luck if you try this!)
This should disable any acceleration done by Allegro (put it before install_mouse):
set_config_int("mouse", "mouse_accel_factor", 0);
But, I remember we had some discussion about this in the past, and it seems that DInput (or the mouse driver itself) does its own acceleration (on some systems/drivers, not on others).
I tried set_config_int("mouse", "mouse_accel_factor", 0);
but no success.
I try to work on mouse accel parameters hoping to find a solution...
If someone has ideas, let me know...
mik