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.