diff -r 28b8330b8af1 -r 174c94b8ea72 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Fri Jan 08 03:38:01 2010 +0000 +++ b/hedgewars/hwengine.pas Fri Jan 08 03:52:44 2010 +0000 @@ -144,14 +144,17 @@ procedure OnDestroy; begin {$IFDEF DEBUGFILE}AddFileLog('Freeing resources...');{$ENDIF} -if isSoundEnabled then ReleaseSound; -StoreRelease; -FreeLand; -SendKB; -CloseIPC; -TTF_Quit; -SDL_Quit; -halt + if isSoundEnabled then ReleaseSound(); + StoreRelease(); + FreeLand(); + SendKB(); + CloseIPC(); + TTF_Quit(); +//{$IFNDEF IPHONEOS} + // TODO: don't halt and don't clean, return to the previous view + SDL_Quit(); + halt(); +//{$ENDIF} end; ///////////////////