<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>get_mouse_mickeys() alternative for windowed modes</title>
		<link>http://www.allegro.cc/forums/view/590051</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 14 Feb 2007 03:33:10 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am using get_mouse_mickeys() a lot in my game, and it works fine in non-windowed modes, but as the documentation says</p><div class="quote_container"><div class="title">TFM said:</div><div class="quote"><p>

Note that the infinite movement may not work in windowed mode, since under some platforms the mouse would leave the window, and may not work at all if the hardware cursor is in use.
</p></div></div><p>

How can I replace this function for windowed modes? <br />I want my game running in both: fullscreen and windowed modes!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 14 Feb 2007 00:09:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just use:<span class="source-code"><a href="http://www.allegro.cc/manual/position_mouse" target="_blank"><span class="a">position_mouse</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a> <span class="k3">/</span> <span class="n">2</span>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a> <span class="k3">/</span> <span class="n">2</span><span class="k2">)</span></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 14 Feb 2007 00:25:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It seems that I was not clear enough.<br />As we all already know, get_mouse_mickeys() measures how far the mouse has moved since the last call to this function, that&#39;s exactly what I need to achieve without using this function(because it doesn&#39;t work in windowed modes)</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
position_mouse(SCREEN_W / 2, SCREEN_H / 2)
</p></div></div><p>

You are positioning the mouse at the center of the screen, that&#39;s not what I want.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 14 Feb 2007 01:18:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>get_mouse_mickeys will still function if you keep repositioning the mouse in the center.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 14 Feb 2007 01:19:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you position the mouse in the center of the screen, get_mouse_mickeys will work, because the user cannot move the mouse outside of the screen.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 14 Feb 2007 01:20:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Except on OSX.  Or has position_mouse been fixed for that yet?</p><p>I actually use delta mouse movement (ie storing the old position and comparing the difference).  But I also want the mouse to be able to leave via the bottom in windowed mode.  So mickies dont work.</p><p>And also most OSs have &#39;lock the mouse to my window&#39; API calls, allegro should really make that available.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Wed, 14 Feb 2007 01:22:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am slow:P, but now I got it!<br />However I think that will raise another problems, (I am also using mouse_x, and mouse_y), I&#39;ll try it now!<br />Thanks!</p><p>EDIT</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And also most OSs have &#39;lock the mouse to my window&#39; API calls
</p></div></div><p>

Which Windows specific functions should I use to do that?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 14 Feb 2007 01:24:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How can I replace this function for windowed modes?
</p></div></div><p>
You can&#39;t, in a portable way.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 14 Feb 2007 02:14:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
And also most OSs have &#39;lock the mouse to my window&#39; API calls, allegro should really make that available.
</p></div></div><p>

Which Windows specific functions should I use to do that?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Wed, 14 Feb 2007 02:56:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Which Windows specific functions should I use to do that?
</p></div></div><p>Well, position_mouse works fine, and it works in Linux, too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Wed, 14 Feb 2007 03:00:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Yes, position_mouse works well.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Wed, 14 Feb 2007 03:33:10 +0000</pubDate>
	</item>
</rss>
