<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/17 Ryan C. Gordon <span dir="ltr"><<a href="mailto:icculus@icculus.org" target="_blank">icculus@icculus.org</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Long overdue, here are the SDL2 patches I promised.<br>
<br>
This is just diff'd against the original GPL release and cleaned up as appropriate, so if it doesn't apply correctly, you'll have to poke at it. Ask questions if you need to.<br>
<br>
Not in this patch: The SDL2 headers (get them from SDL, instead of me inflating this patch massively) or prebuilt libraries (let me know if you want them).<br>
<br>
This is what we're shipping on Steam in the linuxbeta depot, and I'm about to make it live to the general public by default.<span class=""><font color="#888888"><br>
<br>
--ryan.<br>
<br>
</font></span><br>_______________________________________________<br>
aquaria mailing list<br>
<a href="mailto:aquaria@icculus.org">aquaria@icculus.org</a><br>
<a href="http://icculus.org/mailman/listinfo/aquaria" target="_blank">http://icculus.org/mailman/listinfo/aquaria</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">Hi Ryan!</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">@@ -1855,6 +1918,30 @@</div><div class="gmail_extra"> </div><div class="gmail_extra">
 <span class="" style="white-space:pre">      </span>//if (!didOnce)</div><div class="gmail_extra"> <span class="" style="white-space:pre">     </span>{</div><div class="gmail_extra">+#ifdef BBGE_BUILD_SDL2</div><div class="gmail_extra">
+<span class="" style="white-space:pre">              </span>Uint32 flags = 0;</div><div class="gmail_extra">+<span class="" style="white-space:pre">           </span>flags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;</div><div class="gmail_extra">
+<span class="" style="white-space:pre">              </span>if (fullscreen)</div><div class="gmail_extra">+<span class="" style="white-space:pre">                     </span>flags |= SDL_WINDOW_FULLSCREEN;</div><div class="gmail_extra">+<span class="" style="white-space:pre">             </span>gScreen = SDL_CreateWindow(appName.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, flags);</div>
<div class="gmail_extra">+<span class="" style="white-space:pre">             </span>if (gScreen == NULL)</div><div class="gmail_extra">+<span class="" style="white-space:pre">                </span>{</div><div class="gmail_extra">+<span class="" style="white-space:pre">                   </span>std::ostringstream os;</div>
<div class="gmail_extra">+<span class="" style="white-space:pre">                     </span>os << "Couldn't set resolution [" << width << "x" << height << "]\n" << SDL_GetError();</div>
<div class="gmail_extra">+<span class="" style="white-space:pre">                     </span>errorLog(os.str());</div><div class="gmail_extra">+<span class="" style="white-space:pre">                 </span>SDL_Quit();</div><div class="gmail_extra">+<span class="" style="white-space:pre">                 </span>exit(0);</div>
<div class="gmail_extra">+<span class="" style="white-space:pre">             </span>}</div><div class="gmail_extra">+<span class="" style="white-space:pre">           </span>gGLctx = SDL_GL_CreateContext(gScreen);</div><div class="gmail_extra">
+<span class="" style="white-space:pre">              </span>if (gScreen == NULL)</div><div class="gmail_extra">+<span class="" style="white-space:pre">                </span>{</div><div class="gmail_extra">+<span class="" style="white-space:pre">                   </span>std::ostringstream os;</div>
<div class="gmail_extra">+<span class="" style="white-space:pre">                     </span>os << "Couldn't create OpenGL context!\n" << SDL_GetError();</div><div class="gmail_extra">+<span class="" style="white-space:pre">                      </span>errorLog(os.str());</div>
<div class="gmail_extra">+<span class="" style="white-space:pre">                     </span>SDL_Quit();</div><div class="gmail_extra">+<span class="" style="white-space:pre">                 </span>exit(0);</div><div class="gmail_extra">+<span class="" style="white-space:pre">            </span>}</div>
<div class="gmail_extra">+#else</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Just a small observation, but shouldn't the second check verify 'gGLctx' instead of 'gScreen'?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Jonas</div></div></div>