<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Display (fullscreen window) and window dimensions</title>
		<link>http://www.allegro.cc/forums/view/618869</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 28 Oct 2023 21:08:56 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, so somewhere between a previous version of A5 and the current (5.2.8.0), something changed in regard to display dimensions immediately after creating a display.</p><p>Previously, I could create a display with <span class="source-code">ALLEGRO_FULLSCREEN_WINDOW</span>, then do <span class="source-code"><a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span><span class="n">800</span>, <span class="n">600</span><span class="k2">)</span></span>, and the dimensions DIRECTLY after display creation would be the dimensions of my desktop. I could then cache these dimensions and update them only when receiving a <span class="source-code">ALLEGRO_EVENT_DISPLAY_RESIZE</span>, thus avoiding having to constantly poll with <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_display_width"><span class="a">al_get_display_width</span></a></span>, etc.</p><p>However, now when I create my display, the display immediately fills the desktop monitor, but calling <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_display_width"><span class="a">al_get_display_width</span></a></span> immediately after creating the display returns 800! And I never get a <span class="source-code">ALLEGRO_EVENT_DISPLAY_RESIZE</span> to represent the fact that the window changed size to fill the screen.</p><p>Should I just give up trying to cache the display dimensions and poll <span class="source-code"><a href="http://www.allegro.cc/manual/al_get_display_width"><span class="a">al_get_display_width</span></a></span>, etc. on every frame?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bluebird)</author>
		<pubDate>Fri, 27 Oct 2023 22:40:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well that sucks. I think the old behavior was better.</p><p>Try caching both fullscreen and windowed sizes and track whether or not you&#39;re in fullscreen window mode.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 28 Oct 2023 20:50:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s not that I particularly need to know <b>whether</b> I&#39;m fullscreen or not, it&#39;s just that I don&#39;t get an ALLEGRO_EVENT_DISPLAY_RESIZE to signal the switch.</p><p>Anyway I&#39;m polling at the beginning of every frame now, in addition to handling ALLEGRO_EVENT_DISPLAY_RESIZE, and everything works now.</p><p>For reference I also posted at <a href="https://github.com/liballeg/allegro5/issues/1500">https://github.com/liballeg/allegro5/issues/1500</a>. I had also added more info there in a followup.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bluebird)</author>
		<pubDate>Sat, 28 Oct 2023 21:08:56 +0000</pubDate>
	</item>
</rss>
