cpages/OpenXcom — pull request #2 by sfalexrog (2014-05-24 09:28:10+00:00)
Title: Upstream changes and resolution fixes.

Fixes resolution changes, should fix the "crash after reaction fire death" bug.

I guess it's better to let sdl2 manage the whole scaling/res-changing thing. If I'm not mistaken, the sdl1.2 code creates a surface with the same resolution as the screen and then has some code to scale things. In sdl2 on android we just create a window the size of the screen, and let the renderer do the scaling for us. Neat!

Also, for now I'm always destroying and recreating renderer on resetDisplay - i.e. when anything maybe wants to have the screen resized. Maybe not the brightest idea, but it seems to work.

I've also separated the creation of a window and a renderer - android really doesn't like apps that are trying to create more than one window! So there should no longer be any issues with "OK" button in the options.

The game no longer crashes for me after unit death. The source of the problem was probably not checking the getSelectedUnit() method - it returns NULL if the unit just died. (Also, shouldn't the bug also present itself after "Do not reselect"-ing your entire squad and then touching the ground anywhere?)