<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Allegro 4.2 Slow on Windows 7</title>
		<link>http://www.allegro.cc/forums/view/606521</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 25 Feb 2011 22:44:49 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello everyone, I need to run Allegro 4.2 for legacy and I am running Windows 7 32-bit. The programs run super slow and are prone to crashing. The same programs run fine in Windows XP and on another Windows 7 box (64 bit). Any ideas what I can do to fix my issue?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mike Geig)</author>
		<pubDate>Fri, 25 Feb 2011 09:53:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem might be caused by badly written code, so perhaps you should post it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Fri, 25 Feb 2011 13:03:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, I doubt it since it is a simple demo app:</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#include &lt;stdlib.h&gt;</span>
<span class="number">  2</span><span class="p">#include &lt;allegro.h&gt;</span>
<span class="number">  3</span>
<span class="number">  4</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  5</span><span class="k2">{</span>
<span class="number">  6</span>  <a href="http://www.allegro.cc/manual/allegro_init"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  7</span>  <a href="http://www.allegro.cc/manual/set_gfx_mode"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  8</span>  <a href="http://www.allegro.cc/manual/install_keyboard"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  9</span>
<span class="number"> 10</span>  <span class="k1">while</span><span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/key"><span class="a">key</span></a><span class="k2">[</span>KEY_ESC<span class="k2">]</span><span class="k2">)</span>
<span class="number"> 11</span>  <span class="k2">{</span>
<span class="number"> 12</span>    <a href="http://www.allegro.cc/manual/rectfill"><span class="a">rectfill</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, <span class="n">320</span>, <span class="n">240</span>, <span class="n">340</span>, <span class="n">360</span>, <span class="n">15</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 13</span>  <span class="k2">}</span>
<span class="number"> 14</span>  <a href="http://www.allegro.cc/manual/allegro_exit"><span class="a">allegro_exit</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span><span class="k2">}</span>
<span class="number"> 16</span><a href="http://www.allegro.cc/manual/END_OF_MAIN"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mike Geig)</author>
		<pubDate>Fri, 25 Feb 2011 21:21:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How do you know that runs slowly? It&#39;s not doing anything... Does it crash?</p><p>Do you always use 8-bit graphics? Those are known to not work well under Windows 7.</p><p>The best way to get good performance is:</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/set_color_depth"><span class="a">set_color_depth</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/desktop_color_depth"><span class="a">desktop_color_depth</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></span></p><p>Also, Allegro 4.4 might work better. It&#39;s source compatible with 4.2.</p><p>One last thing, make sure the Allegro libraries/binaries you use are for your specific compiler version (not a problem if you built it yourself) and that you use the same C or assembly settings during build, as mixing those can cause crashes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Fri, 25 Feb 2011 21:24:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks Matthew, setting the color depth made the program work great. The only problem there is that my primitives are rendered a very dark, almost black color no matter what color I pass in for them.</p><p>Any ideas?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mike Geig)</author>
		<pubDate>Fri, 25 Feb 2011 22:11:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try using <span class="source-code"><a href="http://www.allegro.cc/manual/makecol"><span class="a">makecol</span></a></span> instead of passing 15 as the color?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Fri, 25 Feb 2011 22:19:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When using anything higher than 8-bit color depth, you have to use <span class="source-code"><a href="http://www.allegro.cc/manual/makecol"><span class="a">makecol</span></a></span> to get the proper integer representation of a color. (8-bit uses an indexed palette.)</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/makecol"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">255</span><span class="k2">)</span></span> is white.</p><p>As an aside, when using 8-bit mode under Windows, the <span class="source-code">GFX_GDI</span> driver is probably the most compatible.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Fri, 25 Feb 2011 22:44:49 +0000</pubDate>
	</item>
</rss>
