<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>How do you change the screen resolution?</title>
		<link>http://www.allegro.cc/forums/view/612872</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 30 Jun 2013 00:50:54 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve been trying to change the screen resolution for a game I&#39;m making and the relevant code is below. If I use 1680x1050 (my current and native resolution), I get a black window that fills the whole screen. If I use any other resolution (such as 1280x800), allegro does make a window (display isn&#39;t NULL), but it&#39;s not filled with black. I haven&#39;t found any allegro function that looks like it changes the screen resolution (other than al_create_display). Can anyone tell me if there is a way to change the monitor resolution and if there is a anything I can do in an allegro fullscreen game other than using the resolution the player currently has?</p><pre>
int width = 1680;
int height = 1050;

al_set_new_display_flags(ALLEGRO_FULLSCREEN);
ALLEGRO_DISPLAY* display = al_create_display(width , height);
if (!display) {
   cout &lt;&lt; &quot;Failed to create display&quot; &lt;&lt; endl;
}
else {
   al_set_target_bitmap(al_get_backbuffer(display));
   al_draw_filled_rectangle(0, 0, 1280, 800, al_map_rgb(0, 255, 0));
}
</pre><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (japheth)</author>
		<pubDate>Wed, 26 Jun 2013 04:51:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Which resolutions are supported in full screen mode depends on the monitor and graphics card that the user uses.</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_resize_display"><span class="a">al_resize_display</span></a></span> can be used for resizing.</p><p>Also, you must call <span class="source-code"><a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a></span> after drawing, for actually printing to the screen. I don&#39;t know if you&#39;re already doing this.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (l j)</author>
		<pubDate>Wed, 26 Jun 2013 05:17:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I figured out what my problem was. I couldn&#39;t change to some resolutions because because I wasn&#39;t changing the existing refresh rate. I looked at the output of al_get_display_mode to determine possible refresh rates for a given resolution and then I was able to set the resolutions I wanted.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (japheth)</author>
		<pubDate>Sun, 30 Jun 2013 00:50:54 +0000</pubDate>
	</item>
</rss>
