Merge: Gamnit: rewrite Android lifecycle support
authorJean Privat <jean@pryen.org>
Fri, 19 Jan 2018 18:09:07 +0000 (13:09 -0500)
committerJean Privat <jean@pryen.org>
Fri, 19 Jan 2018 18:09:07 +0000 (13:09 -0500)
commit5d158ed548ca5849eafcf04744d75af49cb2b070
treeb8b3b7c3f5cfbb35473e25135b0fb24946fbf151
parent6a7cb44af7301becd4c3c7b0f394afa3294ed6f6
parent989b9353d759dcf8d0511bd66d9a405b116d7e3d
Merge: Gamnit: rewrite Android lifecycle support

Rewrite much of the Android support to better deal with system state changes. This includes handling out of order lifecycle messages, temporarily invalid OpenGL display surfaces, and recreating the OpenGL context when it is released by the system.

In practice, this PR recreates in `gamnit::gamnit_android` a better version than what is in `android::game`. The old `android::game` could probably be removed with `mnit` and a small clean up.

As a bonus:
* Into portable* services to lock the device orientation. (The iOS variant will be in another PR when #2605 is merged.)
* Ask for 4x antialiasing, it should be available on all target platforms.
* Compile Android apps using gcc, it appears to compile a more stable GC. We can probably tweak a few defines to use clang instead.
* Fix numeric version numbers using the local time, causing surprises when compiled in the cloud.

Pull-Request: #2607