<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Mouse flicker in fullscreen</title>
		<link>http://www.allegro.cc/forums/view/585795</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 07 Jun 2006 20:08:57 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yep, it&#39;s me... again!  More questions.  Alright, I previously got the mouse to display without any crashes, but I have a new problem.</p><p>Firstly, in windowed mode, the mouse displays without flaw.  However, when the mode is set to full screen, the mouse flickers like mad.  It&#39;s the only thing on the screen that does so, and I don&#39;t know why.  </p><p>What are some possible causes for the mouse flickering in fullscreen but not windowed?  I&#39;ll post the code if need be, but I&#39;m hoping this is a common problem with a common answer :p
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BrknPhoenix)</author>
		<pubDate>Wed, 07 Jun 2006 09:24:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You&#39;re probably showing the mouse on the screen and using a double buffer blitting the screen. The solution is to try using a hardware cursor, or drawing the mouse sprite to the double buffer before blitting it. Something like this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="c">/* after setting a video mode */</span>

<a href="http://www.allegro.cc/manual/enable_hardware_cursor" target="_blank"><span class="a">enable_hardware_cursor</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/show_mouse" target="_blank"><span class="a">show_mouse</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="k1">if</span><span class="k2">(</span><span class="k3">!</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a><span class="k3">&amp;</span>GFX_HW_CURSOR<span class="k2">)</span><span class="k2">)</span>
   <a href="http://www.allegro.cc/manual/show_mouse" target="_blank"><span class="a">show_mouse</span></a><span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">;</span>
...
<span class="k1">while</span><span class="k2">(</span>doing_whatever<span class="k2">)</span>
<span class="k2">{</span>
   ...<span class="k1">do</span> whatever...
   <span class="k1">if</span><span class="k2">(</span><span class="k3">!</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a><span class="k3">&amp;</span>GFX_HW_CURSOR<span class="k2">)</span><span class="k2">)</span>
      <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span>my_double_buffer, <a href="http://www.allegro.cc/manual/mouse_sprite" target="_blank"><span class="a">mouse_sprite</span></a>, <a href="http://www.allegro.cc/manual/mouse_x" target="_blank"><span class="a">mouse_x</span></a>, <a href="http://www.allegro.cc/manual/mouse_y" target="_blank"><span class="a">mouse_y</span></a><span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>my_double_buffer, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a>, <a href="http://www.allegro.cc/manual/SCREEN_H" target="_blank"><span class="a">SCREEN_H</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Wed, 07 Jun 2006 09:58:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hm, it&#39;s fixed now, I just used draw_sprite instead of show_mouse and all of its trappings and now it&#39;s fine...  I still don&#39;t really understand why show_mouse was working in windowed but not fullscreen though, hehe.  Oh well &gt;_&lt;  Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (BrknPhoenix)</author>
		<pubDate>Wed, 07 Jun 2006 16:59:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You probably don&#39;t get a hardware cursor in full-screen mode.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 07 Jun 2006 20:08:57 +0000</pubDate>
	</item>
</rss>
