<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    I've submitted a patch for this to upstream SDL now:<br>
    <a class="moz-txt-link-freetext" href="https://bugzilla.libsdl.org/show_bug.cgi?id=2481">https://bugzilla.libsdl.org/show_bug.cgi?id=2481</a><br>
    <br>
    For testing the changes, RPMs with the change applied are available
    here:<br>
<a class="moz-txt-link-freetext" href="http://repo.merproject.org/obs/home:/thp:/sdl2/1.0.4.20_armv7hl/armv7hl/">http://repo.merproject.org/obs/home:/thp:/sdl2/1.0.4.20_armv7hl/armv7hl/</a><br>
    <br>
    You can install RPM files with "pkcon install-local
    <filename>".<br>
    <br>
    Downstream PR:<br>
    <a class="moz-txt-link-freetext" href="https://github.com/nemomobile-packages/libsdl/pull/1">https://github.com/nemomobile-packages/libsdl/pull/1</a><br>
    <br>
    <br>
    HTH :)<br>
    Thomas<br>
    <br>
    <div class="moz-cite-prefix">On 2014-04-04 18:57, Iosif Hamlatzis
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAD2f6zUdLSzrAG9CYAuqtrO5dOwGpLW7STT+x808iuqFD7rrqA@mail.gmail.com"
      type="cite">
      <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">
</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)">
</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">
</span></pre><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,0)">
</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 moz-do-not-send="true" href="https://github.com/thp/sdl2-opengles-test">https://github.com/thp/sdl2-opengles-test</a></font>


</pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">
</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">
</font></pre><pre style="margin-top:0px;margin-bottom:0px">
<font color="#000000">
</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">
</pre><pre style="margin-top:0px;margin-bottom:0px">

</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><sp
an 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)">
</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)">
</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">
</pre><pre style="margin-top:0px;margin-bottom:0px">
</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">
</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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SailfishOS.org Devel mailing list</pre>
    </blockquote>
    <br>
  </body>
</html>