<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>switch back mode for Windows</title>
		<link>http://www.allegro.cc/forums/view/567858</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 21 Feb 2006 09:57:44 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello,<br />After testing on various computers of mine and friends I&#39;ve noticed that the PAUSE switchback mode works in Windows when running windowed mode, but when you go to fullscreen PAUSE fails and the best you can get is AMNESIA</p><p>Is there any reason for this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 19 Feb 2006 03:33:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I believe it&#39;s a DirectX limitation. It&#39;s the same for BACKGROUND/BACKAMNESIA BTW - I can&#39;t ever remember which one works for which mode, so I always do:</p><div class="source-code snippet"><div class="inner"><pre> <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_display_switch_mode" target="_blank"><span class="a">set_display_switch_mode</span></a><span class="k2">(</span>SWITCH_BACKGROUND<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
    <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/set_display_switch_mode" target="_blank"><span class="a">set_display_switch_mode</span></a><span class="k2">(</span>SWITCH_BACKAMNESIA<span class="k2">)</span><span class="k2">)</span>
       <a href="http://www.allegro.cc/manual/allegro_message" target="_blank"><span class="a">allegro_message</span></a><span class="k2">(</span><span class="s">"Something, somewhere, went wrong somehow.\n"</span><span class="k2">)</span><span class="k2">;</span>
   <span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Sun, 19 Feb 2006 03:40:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Kind of what I do, but why would you want your game to continue when someone switches out?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 19 Feb 2006 14:37:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but why would you want your game to continue when someone switches out?
</p></div></div><p>
What if it is a simulator or computation program instead? Allegro is not only for games
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Avenger)</author>
		<pubDate>Sun, 19 Feb 2006 19:48:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>...or a (networked) multiplayer game for that matter. If the program pauses when in background, the server will think you client is dead, or you will have to pause all other clients and the server when one client loses focus. Not good. Better keep running, but then without rendering anything (simple hook will do the trick).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Mon, 20 Feb 2006 21:12:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Is there any reason for this?
</p></div></div><p>
Yes. Microsoft has this idea that whenever your program is switched out from the foreground, has the screen resolution changed, etc, Windows should go ahead and clear all of video memory for you.</p><p>Once it&#39;s done that, it then notifies the driver that hey, you probably want to reset your GPU&#39;s context cause I trampled all over it. Then, it notifies the app that all video memory was lost and can&#39;t be retrived. Thanks.</p><p>Apps are supposed to hold on to all surface data in main memory and be able to resend them on notice.</p><p>This made sense in a world of 1 and 2 MB framebuffers and no hardware acceleration, back in 1992 or so.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob)</author>
		<pubDate>Tue, 21 Feb 2006 09:57:44 +0000</pubDate>
	</item>
</rss>
