Android’s system back button will be processed as vchrBack which will
select kidcCancel on most forms. This causes the user to feel that the
game is more integrated with the OS.
If the client is connected to multiplayer when the app is backgrounded,
that connection will be closed. If the app is reopened, a message will
be presented with the user informing them of the disconnection. Single
player games will be paused when entering background and resumed when
entering foreground.
On some platforms, the game will crash if SDL attempts to render to the
screen/window while the game is backgrounded. To prevent this, stop
rendering when the game enters a background state and resume rendering
when the game enters a foreground state.
Create the main thread via host rather than being a global variable in
base; this way, no base threads are created before the host runs main()
because that can cause issues on some platforms.