<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5/OSX] al_get_new_display_adapter returns -1</title>
		<link>http://www.allegro.cc/forums/view/606664</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 12 Mar 2011 05:17:43 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That is all. This sounds like a bug to me, since it is quite capable of creating new displays -- it just lies about what adapter it will do so on. Which means I can&#39;t reliably get information about it (with al_get_monitor_info, which by the way should be called al_get_display_adapter_info for consistency). I don&#39;t know if this is an issue on other platforms too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Fri, 11 Mar 2011 21:47:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When it returns -1, it means it&#39;s up to the OS to decide and you haven&#39;t specified a preference. If you care about windows showing up on a particular display, you have to call <span class="source-code"><a href="http://www.allegro.cc/manual/al_set_new_display_adapter"><span class="a">al_set_new_display_adapter</span></a><span class="k2">(</span><span class="k2">)</span></span> first.<br />It&#39;s not obvious across different platforms what the &quot;default&quot; works out to be, which is why the default option is &quot;don&#39;t care&quot; rather than a hard-coded value (0, for instance) or a buggy attempt at guessing what the default should be.</p><p>Unless you&#39;re actually calling <span class="source-code"><a href="http://www.allegro.cc/manual/al_set_new_display_adapter"><span class="a">al_set_new_display_adapter</span></a><span class="k2">(</span><span class="k2">)</span></span> and it&#39;s ignored. That&#39;s a bug.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 11 Mar 2011 23:23:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Then the documentation should stop lying:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Gets the video adapter index where new displays will be created by the calling thread.</p></div></div><p>

It does not do this. The fact that there is only one API function that even uses this index, and it becomes useless since the function doesn&#39;t return anything relevant in the one case where you actually want to use it, makes this a pretty serious issue. If you can&#39;t actually return the video adapter index new displays will be created on, this function shouldn&#39;t exist.</p><p>I don&#39;t actually care what adapter it will show up on. What I do want to know is a few details <i>about</i> that adapter.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Fri, 11 Mar 2011 23:35:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606664/907198#target">X-G</a> said:</div><div class="quote"><p>Then the documentation should stop lying:</p></div></div><p>
It should be documented that <span class="source-code">ALLEGRO_DEFAULT_DISPLAY_ADAPTER</span> is a valid return value from that function, I agree.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 12 Mar 2011 01:42:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The shortcoming is that it cannot be used with <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_monitor_info"><span class="a">al_get_monitor_info</span></a><span class="k2">(</span><span class="k2">)</span></span>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 12 Mar 2011 01:44:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Unfortunately there isn&#39;t really a way to 100% accurately guess which monitor the window is going to appear on if you leave it up to the OS. My X code has some hackish code that will try and emulate what a smart wm would do in some modes (dual X Screen&#39;s without xinerama), but its not something we should try and do for all modes on all OSs.</p><p>I agree that makes the al_get_new_display_adapter function useless in the general case, but if you&#39;ve called al_set_new_display_adapter, it becomes somewhat useful.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 12 Mar 2011 03:13:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Only in the sense that you already know what you set the new display adapter to.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Sat, 12 Mar 2011 04:29:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Added a sentence to the docs.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Sat, 12 Mar 2011 05:04:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606664/907254#target">X-G</a> said:</div><div class="quote"><p>Only in the sense that you already know what you set the new display adapter to.</p></div></div><p>Maybe not. Could have been some other code you don&#39;t have direct control over. But like I said, in the general case, it isn&#39;t exactly useful.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 12 Mar 2011 05:17:43 +0000</pubDate>
	</item>
</rss>
