--- a/hedgewars/uWorld.pas Thu May 31 01:50:49 2018 +0200
+++ b/hedgewars/uWorld.pas Sun Jun 10 19:01:50 2018 +0200
@@ -2014,12 +2014,14 @@
procedure onFocusStateChanged;
begin
-if (not cHasFocus) and (GameState <> gsConfirm) then
- ParseCommand('quit', true);
{$IFDEF MOBILE}
+if (not cHasFocus) and (not isPaused) then
+ ParseCommand('pause', true);
// when created SDL receives an exposure event that calls UndampenAudio at full power, muting audio
exit;
{$ENDIF}
+if (not cHasFocus) and (GameState <> gsConfirm) then
+ ParseCommand('quit', true);
{$IFDEF USE_VIDEO_RECORDING}
// do not change volume during prerecording as it will affect sound in video file