<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>al_destroy_display &amp; al_create_display CONT.</title>
		<link>http://www.allegro.cc/forums/view/618916</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 29 May 2024 20:06:35 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Edgar, </p><p>I thought about the creating a display (2nd) before destroying the first but I don&#39;t see how I could do that without using different display name.  It would be hard to track which display I was using if multiple changes were made.</p><p>What I am seeing some luck with to this point, is I removed the destroy / create<br />// al_destroy_display(disp);<br />// disp = al_create_display(nDispWD,nDispHT);<br />// al_register_event_source(queue, al_get_display_event_source(disp));</p><p>and did a resize.</p><p>al_resize_display(disp, nDispWD, nDispHT);</p><p>The draw scale command I&#39;ve been using seems to keep the pictures and drawn items to scale.  Plus the program doesn&#39;t drop or lag.   Granted I&#39;ve just made the change and it could be too early to tell if it will hold in a playing situation.  I&#39;ll keep you posted if you are interested.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AceBlkwell)</author>
		<pubDate>Wed, 29 May 2024 02:07:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>All it would take is a temporary variable to hold the second display. You&#39;re going to destroy it anyway, so it doesn&#39;t matter.</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span> d <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span>...<span class="k2">)</span><span class="k2">;</span>

<a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a><span class="k3">*</span> dtemp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span>...<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/al_destroy_display"><span class="a">al_destroy_display</span></a><span class="k2">(</span>d<span class="k2">)</span><span class="k2">;</span>
d <span class="k3">=</span> dtemp<span class="k2">;</span><span class="c">// same variable, different value</span>
dtemp <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
</pre></div></div><p>
<img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 29 May 2024 18:28:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Nice, It never occurred to me to assign one screen to another.  Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AceBlkwell)</author>
		<pubDate>Wed, 29 May 2024 20:06:35 +0000</pubDate>
	</item>
</rss>
