hedgewars/hwengine.pas
changeset 2688 174c94b8ea72
parent 2682 d4c395f25db2
child 2689 dfda97c153a4
--- 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;
 
 ///////////////////