<div dir="ltr">I have different behaviour creating a full screen SDL window between Sailfish OS and other mobile platforms I have tested.<div><br></div><div>I am using the same source code below:</div><div><br></div><div><br>

</div><div><pre style="margin-top:0px;margin-bottom:0px">SDL_Window<span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">pWindow</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>SDL_CreateWindow<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">""</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>SDL_WINDOW_OPENGL<span style="color:rgb(0,0,0)">|</span>SDL_WINDOW_FULLSCREEN<span style="color:rgb(0,0,0)">|</span>SDL_WINDOW_SHOWN<span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span>ActualScreenWidth_<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">-1</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span>ActualScreenHeight_<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">-1</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px">SDL_GetWindowSize<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">pWindow</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">&</span>ActualScreenWidth_<span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">&</span>ActualScreenHeight_<span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px">

<span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">In all cases including Sailfish OS I get the correct width and height of the device, but (yes there is a but) on Sailfish OS nothing is drawn on screen when I later try to render an image. I have tested this on the emulator and on the actual device. Also I have tested this not only with my code but also with code I've found at </span><font color="#000000"><a href="https://github.com/thp/sdl2-opengles-test">https://github.com/thp/sdl2-opengles-test</a></font><br style="font-family:arial">

</pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px">

<font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px">If I modify my code to:</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><br>
</pre>
<pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px">SDL_Window<span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">pWindow</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>SDL_CreateWindow<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">""</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>SDL_WINDOW_OPENGL<span style="color:rgb(0,0,0)">|</span>SDL_WINDOW_FULLSCREEN<span style="color:rgb(0,0,0)">|</span>SDL_WINDOW_SHOWN<span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span>ActualScreenWidth_<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">-1</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span>ActualScreenHeight_<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">-1</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px">SDL_GetWindowSize<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">pWindow</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">&</span>ActualScreenWidth_<span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">&</span>ActualScreenHeight_<span style="color:rgb(0,0,0)">);</span></pre>

<div><span style="color:rgb(0,0,0)"><br></span></div><div><pre style="margin-top:0px;margin-bottom:0px"><b>SDL_DestroyWindow<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">pWindow</span><span style="color:rgb(0,0,0)">);</span></b></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">pWindow</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>SDL_CreateWindow<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">""</span><span style="color:rgb(0,0,0)">,</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">                           </font><span style="font-family:arial;color:rgb(0,0,128)">0</span><span style="font-family:arial;color:rgb(0,0,0)">,</span><span style="font-family:arial;color:rgb(192,192,192)"> </span><span style="font-family:arial;color:rgb(0,0,128)">0</span><span style="font-family:arial;color:rgb(0,0,0)">,</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                           </span><b>ActualScreenWidth_<span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>ActualScreenHeight_</b><span style="color:rgb(0,0,0)">,</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                           </span>SDL_WINDOW_OPENGL<span style="color:rgb(0,0,0)">|</span>SDL_WINDOW_FULLSCREEN<span style="color:rgb(0,0,0)">|</span>SDL_WINDOW_SHOWN<span style="color:rgb(0,0,0)">);</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Which I think is strange since in the first place the <b>pWindow</b> I get from the first call is valid and the values I get from querying the window size correspond to the device's resolution.</pre>

<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Besides the first code snippet works on all platforms I've tested from plain PC to mobile platforms such as webOS. BlackBerry (PlayBook and BB10) and iOS</pre>

</div></pre></pre></pre></div></div>