hedgewars/uWorld.pas
branchios-develop
changeset 13229 01ab48b253ef
parent 12836 1fbc0d5a82d0
child 13417 236cc4cf2448
--- a/hedgewars/uWorld.pas	Thu Mar 15 23:24:48 2018 +0100
+++ b/hedgewars/uWorld.pas	Thu Mar 15 23:59:20 2018 +0100
@@ -1995,12 +1995,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