hedgewars/uWorld.pas
changeset 13417 236cc4cf2448
parent 13375 e202d58236b1
parent 13229 01ab48b253ef
child 13464 08a3851aaf67
--- 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