<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Problem with fullscreen reported by some users</title>
		<link>http://www.allegro.cc/forums/view/613209</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 18 Sep 2013 19:34:04 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi All! I&#39;ve released an alpha of my indie game Isomer yesterday and am having some bug reports of users being unable to use the fullscreen mode.</p><p>In both cases the users have multimonitor setups (but this can&#39;t be the root cause as I&#39;ve tested on a number of dual monitor setups myself including my dev machine without problem). </p><p>Here&#39;s the problem as described on my forum:</p><div class="source-code snippet"><div class="inner"><pre>When I start the game, Isomer appears in the task bar, 
but nothing <span class="k1">else</span> happens. If I click somewhere the <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a> 
flashes black fast, same way as any fullscreen game would 
<span class="k1">if</span> you alt<span class="k3">+</span>tab out <span class="k1">or</span> in of a game. Mouse cursor also jumps 
at center of the primary screen.
If I attempt activate Isomer by clicking it from task bar a 
small black box appears at top left corner of the primary screen.

I tried also to use only one <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, by disabling either 
primary <span class="k1">or</span> secondary <a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a>, but it had no effect.
</pre></div></div><p>

The person who reported the issue even posted a video of the problem : <a href="https://dl.dropboxusercontent.com/u/37902077/isomer/fullscreen_fail_to_start.avi">https://dl.dropboxusercontent.com/u/37902077/isomer/fullscreen_fail_to_start.avi</a></p><p>I&#39;m not doing anything unusual in how I initialse the display:</p><div class="source-code snippet"><div class="inner"><pre>    <a href="http://www.allegro.cc/manual/al_set_new_display_flags"><span class="a">al_set_new_display_flags</span></a><span class="k2">(</span> ALLEGRO_FULLSCREEN <span class="k2">)</span><span class="k2">;</span>
 
    m_pDisplay <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> nWindowWidth, nWindowHeight <span class="k2">)</span><span class="k2">;</span>

    <span class="k1">if</span><span class="k2">(</span> <span class="k3">!</span> m_pDisplay <span class="k2">)</span> 
    <span class="k2">{</span>
        _ASSERT<span class="k2">(</span> <span class="n">0</span> <span class="k2">)</span><span class="k2">;</span>
        ThrowErrorAndQuit<span class="k2">(</span> <span class="s">"Unable to create display ..."</span> <span class="k2">)</span><span class="k2">;</span>
        <span class="k1">return</span> <span class="k1">false</span><span class="k2">;</span>
    <span class="k2">}</span>
</pre></div></div><p>

So I&#39;m at a bit of a loss.. needless to say the error handling part of the code doesn&#39;t trigger so it would appear al_create_display worked.</p><p>Any ideas anyone?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Sun, 01 Sep 2013 21:57:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Seems like a bug with Allegro (D3D) or the person&#39;s graphics drivers.</p><p>How hard would it be for you to support <span class="source-code">ALLEGRO_FULLSCREEN_WINDOW</span>? It is going to give you the best compatibility, but you&#39;ll need to do the scaling yourself since the resolution will be dependent on their current desktop.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Mon, 02 Sep 2013 01:39:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For the scaling, just use transformations to simulate the desired target resolution from the native resolution.</p><p>This way, regardless of the user&#39;s resolution, it will always feel like a given resolution.</p><p>This is what I do. I find ALLEGRO_FULLSCREEN buggy. Not necessarily Allegro&#39;s fault, but D3D has a lot of fits when it is asked to go fullscreen.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Mon, 02 Sep 2013 05:40:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve run into buggy behavior with allegro and the various fullscreen options.  The one that still evades me is when no multi-monitor is setup, the primary display is driver 0 (makes sense).  When a monitor is plugged in, the primary display is driver 1 and the secondary display is driver 0.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Mark Oates)</author>
		<pubDate>Mon, 02 Sep 2013 15:27:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was looking at ALLEGRO_FULLSCREEN_WINDOW, I&#39;ll probably look to give this a go if it&#39;s likely to fix the issue. </p><p>The other point is that I was a little behind on Allegro library versions when I released. I was using 5.0.5 (which I noticed was quite old actually) whereas the latest is 5.0.10. I didn&#39;t see anything obvious in the changelog which would indicate this had fixed the problem however <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Thu, 05 Sep 2013 16:42:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Matthew created a nice function for scaling the screen for fullscreen window that works really well...</p><p><b>a5_scale_screen.c</b>
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="c">// Scale Screen:</span>
<span class="number">  2</span><span class="c">//    Sets up transforms in order to fit any resolution</span>
<span class="number">  3</span><span class="c">//    onto an ALLEGRO_FULLSCREEN_WINDOW.</span>
<span class="number">  4</span><span class="c">//</span>
<span class="number">  5</span><span class="c">// (Special thanks to Matthew Leverton for help with this!)</span>
<span class="number">  6</span>
<span class="number">  7</span><span class="p">#include "a5_scale_screen.h"</span>
<span class="number">  8</span>
<span class="number">  9</span>
<span class="number"> 10</span>
<span class="number"> 11</span><span class="c">// Use to get mouse position on scaled screen</span>
<span class="number"> 12</span><span class="k1">float</span> scale_x <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 13</span><span class="k1">float</span> scale_y <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 14</span><span class="k1">int</span> offset_x <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 15</span><span class="k1">int</span> offset_y <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 16</span>
<span class="number"> 17</span>
<span class="number"> 18</span>
<span class="number"> 19</span><span class="c">// usage: a5_scale_screen(BUFFER_WIDTH, BUFFER_HEIGHT, display_width, display_height);</span>
<span class="number"> 20</span><span class="k1">void</span> a5_scale_screen<span class="k2">(</span><span class="k1">int</span> bw, <span class="k1">int</span> bh, <span class="k1">int</span> dw, <span class="k1">int</span> dh<span class="k2">)</span>
<span class="number"> 21</span><span class="k2">{</span>
<span class="number"> 22</span>   <a href="http://www.allegro.cc/manual/ALLEGRO_TRANSFORM"><span class="a">ALLEGRO_TRANSFORM</span></a> t<span class="k2">;</span>
<span class="number"> 23</span>
<span class="number"> 24</span>   <span class="c">// Calculate the horizontal and vertial aspect ratios</span>
<span class="number"> 25</span>   <span class="k1">const</span> <span class="k1">float</span> HAR <span class="k3">=</span> dw <span class="k3">/</span> <span class="k2">(</span><span class="k1">float</span><span class="k2">)</span>bw<span class="k2">;</span>
<span class="number"> 26</span>   <span class="k1">const</span> <span class="k1">float</span> VAR <span class="k3">=</span> dh <span class="k3">/</span> <span class="k2">(</span><span class="k1">float</span><span class="k2">)</span>bh<span class="k2">;</span>
<span class="number"> 27</span>
<span class="number"> 28</span>   <span class="c">// The aspect ratio, x-offset and y-offset (in pixels)</span>
<span class="number"> 29</span>   <span class="k1">float</span> ar, ox, oy<span class="k2">;</span>
<span class="number"> 30</span>
<span class="number"> 31</span>   <span class="k1">if</span><span class="k2">(</span>bw <span class="k3">=</span><span class="k3">=</span> dw <span class="k3">&amp;</span><span class="k3">&amp;</span> bh <span class="k3">=</span><span class="k3">=</span> dh<span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 32</span>      <span class="c">// 1:1, just reset everything</span>
<span class="number"> 33</span>      <a href="http://www.allegro.cc/manual/al_identity_transform"><span class="a">al_identity_transform</span></a><span class="k2">(</span><span class="k3">&amp;</span>t<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 34</span>      <a href="http://www.allegro.cc/manual/al_use_transform"><span class="a">al_use_transform</span></a><span class="k2">(</span><span class="k3">&amp;</span>t<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 35</span>      <a href="http://www.allegro.cc/manual/al_set_clipping_rectangle"><span class="a">al_set_clipping_rectangle</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, bw, bh<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 36</span>      scale_x <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 37</span>      scale_y <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number"> 38</span>      offset_x <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 39</span>      offset_y <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 40</span>      <a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 41</span>      <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 42</span>   <span class="k2">}</span>
<span class="number"> 43</span>   <span class="k1">else</span> <span class="k2">{</span>
<span class="number"> 44</span>      <span class="c">// Choose the smaller aspect ratio</span>
<span class="number"> 45</span>      <span class="k1">if</span><span class="k2">(</span>HAR <span class="k3">&lt;</span> VAR<span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 46</span>         <span class="c">// horizontal bars on the top and bottom</span>
<span class="number"> 47</span>         ar <span class="k3">=</span> HAR<span class="k2">;</span>
<span class="number"> 48</span>         ox <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 49</span>         oy <span class="k3">=</span> <span class="k2">(</span>dh <span class="k3">-</span> <span class="k2">(</span>ar <span class="k3">*</span> bh<span class="k2">)</span><span class="k2">)</span> <span class="k3">/</span> <span class="n">2</span>.<span class="n">0</span><span class="k2">;</span>
<span class="number"> 50</span>      <span class="k2">}</span>
<span class="number"> 51</span>      <span class="k1">else</span> <span class="k2">{</span>
<span class="number"> 52</span>         <span class="c">// vertical bars on the left and right</span>
<span class="number"> 53</span>         ar <span class="k3">=</span> VAR<span class="k2">;</span>
<span class="number"> 54</span>         ox <span class="k3">=</span> <span class="k2">(</span>dw <span class="k3">-</span> <span class="k2">(</span>ar <span class="k3">*</span> bw<span class="k2">)</span><span class="k2">)</span> <span class="k3">/</span> <span class="n">2</span>.<span class="n">0</span><span class="k2">;</span>
<span class="number"> 55</span>         oy <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 56</span>      <span class="k2">}</span>
<span class="number"> 57</span>
<span class="number"> 58</span>      <span class="c">// set the global scale/offset so the mouse coords can be inverted</span>
<span class="number"> 59</span>      <span class="c">// use the following code to get the proper mouse position</span>
<span class="number"> 60</span>      <span class="c">// mouse_x = (event.mouse.x - offset_x) / scale_x;</span>
<span class="number"> 61</span>      <span class="c">// mouse_y = (event.mouse.y - offset_y) / scale_y;</span>
<span class="number"> 62</span>      scale_x <span class="k3">=</span> ar<span class="k2">;</span>
<span class="number"> 63</span>      scale_y <span class="k3">=</span> ar<span class="k2">;</span>
<span class="number"> 64</span>      offset_x <span class="k3">=</span> ox<span class="k2">;</span>
<span class="number"> 65</span>      offset_y <span class="k3">=</span> oy<span class="k2">;</span>
<span class="number"> 66</span>
<span class="number"> 67</span>      <span class="c">// set up the transformation to scale and translate</span>
<span class="number"> 68</span>      <a href="http://www.allegro.cc/manual/al_build_transform"><span class="a">al_build_transform</span></a><span class="k2">(</span><span class="k3">&amp;</span>t, ox, oy, ar, ar, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 69</span>      <a href="http://www.allegro.cc/manual/al_use_transform"><span class="a">al_use_transform</span></a><span class="k2">(</span><span class="k3">&amp;</span>t<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 70</span>
<span class="number"> 71</span>      <span class="c">// clear out the screen before setting the clipping</span>
<span class="number"> 72</span>      <a href="http://www.allegro.cc/manual/al_set_clipping_rectangle"><span class="a">al_set_clipping_rectangle</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, dw, dh<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 73</span>      <a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 74</span>      <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 75</span>
<span class="number"> 76</span>      <span class="c">// make sure nothing is drawn into the black bars</span>
<span class="number"> 77</span>      <a href="http://www.allegro.cc/manual/al_set_clipping_rectangle"><span class="a">al_set_clipping_rectangle</span></a><span class="k2">(</span>ox, oy, ar <span class="k3">*</span> bw, ar <span class="k3">*</span> bh<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 78</span>   <span class="k2">}</span>
<span class="number"> 79</span><span class="k2">}</span>
</div></div><p>

<b>a5_scale_screen.h</b>
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#ifndef _a5_scale_screen_h_</span>
<span class="p">#define _a5_scale_screen_h_</span>

<span class="p">#include &lt;allegro5/allegro.h&gt;</span>

<span class="k1">extern</span> <span class="k1">float</span> scale_x<span class="k2">;</span>
<span class="k1">extern</span> <span class="k1">float</span> scale_y<span class="k2">;</span>
<span class="k1">extern</span> <span class="k1">int</span> offset_x<span class="k2">;</span>
<span class="k1">extern</span> <span class="k1">int</span> offset_y<span class="k2">;</span>

<span class="c">// usage: a5_scale_screen(BUFFER_WIDTH, BUFFER_HEIGHT, display_width, display_height);</span>
<span class="k1">void</span> a5_scale_screen<span class="k2">(</span><span class="k1">int</span> bw, <span class="k1">int</span> bh, <span class="k1">int</span> dw, <span class="k1">int</span> dh<span class="k2">)</span><span class="k2">;</span>

<span class="p">#endif</span>
</pre></div></div><p>


I used the following commands before calling this function which effects the quality...</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><a href="http://www.allegro.cc/manual/al_set_new_bitmap_flags"><span class="a">al_set_new_bitmap_flags</span></a><span class="k2">(</span>ALLEGRO_MAG_LINEAR<span class="k2">)</span><span class="k2">;</span>
<span class="number">  2</span><a href="http://www.allegro.cc/manual/al_set_blender"><span class="a">al_set_blender</span></a><span class="k2">(</span>ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA<span class="k2">)</span><span class="k2">;</span>
<span class="number">  3</span><a href="http://www.allegro.cc/manual/al_set_new_display_option"><span class="a">al_set_new_display_option</span></a><span class="k2">(</span>ALLEGRO_SINGLE_BUFFER, <span class="n">1</span>, ALLEGRO_REQUIRE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  4</span>
<span class="number">  5</span><a href="http://www.allegro.cc/manual/al_set_new_display_flags"><span class="a">al_set_new_display_flags</span></a><span class="k2">(</span>ALLEGRO_FULLSCREEN_WINDOW<span class="k2">)</span><span class="k2">;</span>
<span class="number">  6</span>
<span class="number">  7</span><span class="c">// Allegro picks the desktop resolution automatically with ALLEGRO_FULLSCREEN_WINDOW flag set.</span>
<span class="number">  8</span><a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a> <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>WIDTH, HEIGHT<span class="k2">)</span><span class="k2">;</span>
<span class="number">  9</span>
<span class="number"> 10</span>screen_w <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_display_width"><span class="a">al_get_display_width</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 11</span>screen_h <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_get_display_height"><span class="a">al_get_display_height</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen"><span class="a">screen</span></a><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 12</span>
<span class="number"> 13</span>a5_scale_screen<span class="k2">(</span>WIDTH, HEIGHT, screen_w, screen_h<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 14</span>
<span class="number"> 15</span><a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_map_rgb_f"><span class="a">al_map_rgb_f</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span><a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 17</span>
<span class="number"> 18</span><span class="c">// etc...</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Roy)</author>
		<pubDate>Fri, 06 Sep 2013 05:05:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Someone who encountered the issue sent me a dump file that I dug into, here&#39;s what I could find:</p><p>Firstly, it appears as though my game engine is caught waiting for an event which is never forthcoming from Allegro...</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span> m_pEventQueue, <span class="k3">&amp;</span>ev <span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

of course it could just be the execution pointer jumping ahead, here are the calls before this point</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="k1">bool</span> CSepiaEngine::BeginGameLoop<span class="k2">(</span><span class="k2">)</span>
<span class="number">  2</span><span class="k2">{</span>
<span class="number">  3</span>    m_pTimerFPS <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_timer"><span class="a">al_create_timer</span></a><span class="k2">(</span> <span class="n">1</span>.<span class="n">0</span> <span class="k3">/</span> m_nFPS <span class="k2">)</span><span class="k2">;</span>
<span class="number">  4</span>
<span class="number">  5</span>    m_pTimerGameLogic <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_timer"><span class="a">al_create_timer</span></a><span class="k2">(</span> <span class="n">1</span>.<span class="n">0</span> <span class="k3">/</span> m_nGameTickRate <span class="k2">)</span><span class="k2">;</span>
<span class="number">  6</span>
<span class="number">  7</span>    m_pEventQueue <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_event_queue"><span class="a">al_create_event_queue</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  8</span>
<span class="number">  9</span>    <span class="k1">if</span><span class="k2">(</span> <span class="k3">!</span> m_pEventQueue <span class="k2">)</span> 
<span class="number"> 10</span>    <span class="k2">{</span>
<span class="number"> 11</span>        ThrowErrorAndQuit<span class="k2">(</span> <span class="s">"Failed to create event_queue!"</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 12</span>        <span class="k1">return</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 13</span>    <span class="k2">}</span>
<span class="number"> 14</span> 
<span class="number"> 15</span>    <a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span> m_pEventQueue, <a href="http://www.allegro.cc/manual/al_get_display_event_source"><span class="a">al_get_display_event_source</span></a><span class="k2">(</span> m_pDisplay <span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 16</span> 
<span class="number"> 17</span>    <a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span> m_pEventQueue, <a href="http://www.allegro.cc/manual/al_get_timer_event_source"><span class="a">al_get_timer_event_source</span></a><span class="k2">(</span> m_pTimerFPS <span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 18</span>
<span class="number"> 19</span>    <a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span> m_pEventQueue, <a href="http://www.allegro.cc/manual/al_get_timer_event_source"><span class="a">al_get_timer_event_source</span></a><span class="k2">(</span> m_pTimerGameLogic <span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 20</span>
<span class="number"> 21</span>    <a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span> m_pEventQueue, <a href="http://www.allegro.cc/manual/al_get_keyboard_event_source"><span class="a">al_get_keyboard_event_source</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 22</span>
<span class="number"> 23</span>    <a href="http://www.allegro.cc/manual/al_register_event_source"><span class="a">al_register_event_source</span></a><span class="k2">(</span> m_pEventQueue, <a href="http://www.allegro.cc/manual/al_get_mouse_event_source"><span class="a">al_get_mouse_event_source</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 24</span> 
<span class="number"> 25</span>    <a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span> <a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span> <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span> <span class="k2">)</span> <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 26</span> 
<span class="number"> 27</span>    <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 28</span> 
<span class="number"> 29</span>    <a href="http://www.allegro.cc/manual/al_start_timer"><span class="a">al_start_timer</span></a><span class="k2">(</span> m_pTimerGameLogic <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 30</span>    <a href="http://www.allegro.cc/manual/al_start_timer"><span class="a">al_start_timer</span></a><span class="k2">(</span> m_pTimerFPS <span class="k2">)</span><span class="k2">;</span>
<span class="number"> 31</span>
<span class="number"> 32</span>    <span class="k1">bool</span> fRedraw <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 33</span>    <span class="k1">bool</span> fTickGame <span class="k3">=</span> <span class="k1">false</span><span class="k2">;</span>
<span class="number"> 34</span> 
<span class="number"> 35</span>    <span class="k1">while</span><span class="k2">(</span> <span class="k3">!</span> m_fQuitOnNextCycle <span class="k2">)</span>
<span class="number"> 36</span>    <span class="k2">{</span>
<span class="number"> 37</span>        <a href="http://www.allegro.cc/manual/ALLEGRO_EVENT"><span class="a">ALLEGRO_EVENT</span></a> ev<span class="k2">;</span>
<span class="number"> 38</span>
<span class="number"> 39</span>        <span class="c">// Blocking call</span>
<span class="number"> 40</span>        <a href="http://www.allegro.cc/manual/al_wait_for_event"><span class="a">al_wait_for_event</span></a><span class="k2">(</span> m_pEventQueue, <span class="k3">&amp;</span>ev <span class="k2">)</span><span class="k2">;</span>
</div></div><p>

.. however it does mean that initialization did complete i.e. al_create_display didn&#39;t return an error condition.</p><p>Annoyingly in the build of the allegro library I&#39;m using (from <a href="https://www.allegro.cc/files/">https://www.allegro.cc/files/</a>) the pdb files don&#39;t match up to the binary I distributed so I can&#39;t see what&#39;s going on from there, but it appears from the call stack that Allegro gets stuck waiting on an _NtWaitForSingleObject from a call in d3d9.dll (see image)</p><p><span class="remote-thumbnail"><span class="json">{"name":"3fullscreenbug.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/f\/ff7ffddfb3a9d6a5237c282026d3b990.jpg","w":550,"h":308,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/f\/ff7ffddfb3a9d6a5237c282026d3b990"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/f/f/ff7ffddfb3a9d6a5237c282026d3b990-240.jpg" alt="3fullscreenbug.jpg" width="240" height="134" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Mon, 16 Sep 2013 19:27:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I know very little about D3D but, that seems like some weird issue where allegro is waiting on a D3D object event while setting up a mode, which isn&#39;t firing.. hmmm.</p><p>If at all possible, a proper full trace would be very helpful.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 16 Sep 2013 20:44:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I tried to earlier but the pdb files from allegro-5.0.10-msvc-10.0\lib seem strange (see screenshot). There isn&#39;t one for the dll in the stack trace and they all have -debug appended for some reason. I did try renaming allegro-5.0.10-md-debug.pdb to allegro-5.0.10-md.pdb but visual studio wasn&#39;t happy with that..</p><p><span class="remote-thumbnail"><span class="json">{"name":"allegro10pdbfiles.JPG","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/7\/c74c88759346c50852638eab8c5c5139.jpg","w":626,"h":193,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/7\/c74c88759346c50852638eab8c5c5139"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/c/7/c74c88759346c50852638eab8c5c5139-240.jpg" alt="allegro10pdbfiles.JPG" width="240" height="73" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Mon, 16 Sep 2013 21:00:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I imagine to use those you need to link to the debug libs and release that to testers? That would also get you allegro.log.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 16 Sep 2013 21:07:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh interesting, could you explain more? Only a few players get this problem, I can&#39;t reproduce it on my test machines and I don&#39;t really want to distribute debug code to players</p><p>Why are the release pdb files not bundled out of interest?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Mon, 16 Sep 2013 21:14:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m pretty sure release pdb files would be pretty useless because the release version would have far less useful information in them, and optimized code would make things interesting.</p><p>But we might be able to convince the msvc builder guy to make those files for the release libs as well..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Mon, 16 Sep 2013 21:29:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I take the point as the compiler does tend to bend the code a bit, however it is more common to keep the PDBs for release mode binaries. How else do you track down issues &#39;in the field&#39;? Previously where I&#39;ve worked we&#39;ve used the release generated PDB files to good effect to track down all sorts of issues. </p><p>Since the files are generated at build time irrespective I would move to have them zipped up and distributed too. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>This is a bit of a sticking point for me because I don&#39;t really want to distribute debug builds because of performance issues to players, nor do I really want to code around the issue (but thanks to NiteHackr who provided some sample code for me to look at) unless I have to in case it turns out to be a quick fix in Allegro that could benefit all users of fullscreen mode <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Any idea about how long it might take for an Allegro developer to fix this? Unfortunately I don&#39;t have enough experience with D3D currently to take the job on myself...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Mon, 16 Sep 2013 21:37:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ll try on my multi monitor setup today. If I can reproduce it I might be able to fix it. If not, we&#39;re going to need a better trace. For that you&#39;ll either have to track down Michal Cichon who builds the binaries, or build binaries yourself.</p><p>EDIT: Can&#39;t produce the problem here. Are all the affected users running Vista? Which graphics hardware?</p><p>EDIT2: If you send me a copy of the game or something that produces the problem, I can try again. It could be discrepancy between Allegro libraries or something.</p><p>EDIT3: Was Allegro built with WANT_D3D9EX? Might have to ask Michal and try the opposite setting.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Mon, 16 Sep 2013 21:59:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you compiling as a GUI application? And have you tried setting the window position after creating your window? Sometimes they appear offscreen and not visible yet.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 17 Sep 2013 03:21:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok some progress, a really awesome user swapped out the release library with the debug version and sent me the Allegro log files and a dump file I could open fully.</p><p>Here&#39;s the full stack trace:</p><p><span class="remote-thumbnail"><span class="json">{"name":"fullstacktrace.JPG","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/f\/6fc03bca8f5194807085f0ac3ace79f6.jpg","w":800,"h":296,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/f\/6fc03bca8f5194807085f0ac3ace79f6"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/6/f/6fc03bca8f5194807085f0ac3ace79f6-240.jpg" alt="fullstacktrace.JPG" width="240" height="88" /></span></p><p>I&#39;m using a multimonitor setup on at two test machines including my dev machine, plus at least two testers used multiple monitors without seeing the issue. That said at least four people on my forum are experiencing the issue, I&#39;m waiting to hear back as to what hardware they all have but I&#39;d guess it would be fairly different. We will see!</p><p>Trent: Send me a mail to konrad@ionisingsoftware.co.uk and I&#39;ll send you a build key to test <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>I don&#39;t know if Allegro was built with this flag I&#39;m afraid, I&#39;m just using the official version from <a href="http://cdn.allegro.cc/file/library/allegro/5.0.10/allegro-5.0.10-msvc-10.0.7z">http://cdn.allegro.cc/file/library/allegro/5.0.10/allegro-5.0.10-msvc-10.0.7z</a> .</p><p>Logs and dump file : <a href="http://www.ionisingsoftware.co.uk/isomer_worklog/isomer_0803_dump_fullscreenissue.zip">http://www.ionisingsoftware.co.uk/isomer_worklog/isomer_0803_dump_fullscreenissue.zip</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Tue, 17 Sep 2013 14:23:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The backtrace looks pretty normal. Typically you spend most of your time in al_wait_for_event and that&#39;s what&#39;s happening here. Nothing unusual in the logs either. I sent you an email.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Tue, 17 Sep 2013 21:58:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>True.. it&#39;s not the wait but the SetRenderState in d3d9.dll that caught my eye. Given that this trace was taken when the game is sitting doing nothing after having failed to create a fullscreen window (instead doing what is shown here : <a href="https://dl.dropboxusercontent.com/u/37902077/isomer/fullscreen_fail_to_start.avi">https://dl.dropboxusercontent.com/u/37902077/isomer/fullscreen_fail_to_start.avi</a> ).</p><p>I wonder actually whether the game is running normally in the background and simply failing to render...</p><p>Not received your email yet for some reason but will send you download details when I do.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Tue, 17 Sep 2013 22:38:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My first email bounced and I sent another. Did you still not get it? I can send from another email address...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Wed, 18 Sep 2013 07:52:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sorry for the delayed reply.. timezones! I&#39;ve replied to your email with the details. I&#39;m not sure if it helps but I received this further information from a player:</p><p><i>I found a workaround how to get the fullscreen to work (in my case). Seems that Isomer doesn&#39;t like my screen&#39;s native resolution 1920x1200. If I drop the resolution to 1920x1080, or anything lower the fullscreen mode works fine. 1920x1200 gives still the black box. 1680x1050 gives also black box.

Here&#39;s my setup:
Two 24inch screens (HP LP2475w and Dell U2412M), both using 1920x1200 resolution.
both screens connected to EVGA GeForce GTX 580
Asus P8Z77-V motherboard
8GB RAM
Windows 7 x64</i></p><p>Although I tried a range of resolutions in my monitor including 1680x1050 (my monitor doesn&#39;t go higher than 1920x1080 sadly) without problem, so this seems to raise more questions than answers..
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Ionising)</author>
		<pubDate>Wed, 18 Sep 2013 19:34:04 +0000</pubDate>
	</item>
</rss>
