<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>how disable mouse acceleration in visual c ?</title>
		<link>http://www.allegro.cc/forums/view/580151</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 20 Apr 2006 00:20:33 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Hi,</p><p>I used the function get_mouse_mickeys().</p><p>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.</p><p>I tried to disable it (in win xp) through control panel with no success.</p><p>Is there a function that disables the acceleration ( or speed threshold? ) ?</p><p>mik <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (mik dighi)</author>
		<pubDate>Wed, 19 Apr 2006 00:53:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You will need to turn down the acceleration in the control panel.</p><p>If you want to add serial mice to your app, this is not the main pointer, i have code for that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Wed, 19 Apr 2006 10:18:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
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.</p><p>Is there a function that let me manipulate the speed or acceleration parameters ?</p><p>mik
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (mik dighi)</author>
		<pubDate>Wed, 19 Apr 2006 12:18:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>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.</p><p>You could tweak the mouse acceleration parameters and recompile allegro
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define MAF_DEFAULT 1                 /* mouse acceleration parameters */</span>
<span class="k1">static</span> <span class="k1">int</span> mouse_accel_fact <span class="k3">=</span> MAF_DEFAULT<span class="k2">;</span>
<span class="k1">static</span> <span class="k1">int</span> mouse_accel_mult <span class="k3">=</span> MAF_DEFAULT<span class="k2">;</span>
<span class="k1">static</span> <span class="k1">int</span> mouse_accel_thr1 <span class="k3">=</span> <span class="n">5</span> <span class="k3">*</span> <span class="n">5</span><span class="k2">;</span>
<span class="k1">static</span> <span class="k1">int</span> mouse_accel_thr2 <span class="k3">=</span> <span class="n">16</span> <span class="k3">*</span> <span class="n">16</span><span class="k2">;</span>
</pre></div></div><p>

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!)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fiddler)</author>
		<pubDate>Wed, 19 Apr 2006 16:02:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This should disable any acceleration done by Allegro (put it before install_mouse):
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/set_config_int" target="_blank"><span class="a">set_config_int</span></a><span class="k2">(</span><span class="s">"mouse"</span>, <span class="s">"mouse_accel_factor"</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
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).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Wed, 19 Apr 2006 16:19:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I tried  set_config_int(&quot;mouse&quot;, &quot;mouse_accel_factor&quot;, 0);</p><p>but no success.</p><p>I try to work on mouse accel parameters hoping to find a solution...</p><p>If someone has ideas, let me know...</p><p>mik
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (mik dighi)</author>
		<pubDate>Thu, 20 Apr 2006 00:20:33 +0000</pubDate>
	</item>
</rss>
