# HG changeset patch # User Wuzzy # Date 1509387533 -3600 # Node ID 8a359cc248d177b4f08dd71bfcd3985d6c1448c1 # Parent 5bdb2f43641e7822c2c9ad0454583f5a06052383 Fix Hedgewars going into suspension mode (game freezes) when windows got minimized diff -r 5bdb2f43641e -r 8a359cc248d1 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Mon Oct 30 03:37:17 2017 +0100 +++ b/hedgewars/hwengine.pas Mon Oct 30 19:18:53 2017 +0100 @@ -205,11 +205,18 @@ cHasFocus:= false; onFocusStateChanged(); end; +{$IFDEF MOBILE} +(* Suspend game if minimized on mobile. +NOTE: Mobile doesn't support online multiplayer yet, so it's not a problem. +BUT: This section WILL become a bug when online multiplayer is added to +Hedgewars and needs to be rethought. This is because it will cause the +game to freeze if one online player minimizes Hedgewars. *) SDL_WINDOWEVENT_MINIMIZED: begin previousGameState:= GameState; GameState:= gsSuspend; end; +{$ENDIF} SDL_WINDOWEVENT_RESTORED: begin if GameState = gsSuspend then