hedgewars/uUtils.pas
changeset 7896 67217e6108fd
parent 7565 00568d3054d0
child 8026 4a4f21070479
child 8095 df61e150eb70
--- a/hedgewars/uUtils.pas	Mon Oct 29 20:37:57 2012 -0400
+++ b/hedgewars/uUtils.pas	Tue Oct 30 02:22:54 2012 +0100
@@ -73,7 +73,7 @@
 procedure WriteLn(var f: textfile; s: shortstring);
 {$ENDIF}
 
-procedure initModule(isGame: boolean);
+procedure initModule(isNotPreview: boolean);
 procedure freeModule;
 
 
@@ -401,14 +401,14 @@
 end;
 {$ENDIF}
 
-procedure initModule(isGame: boolean);
+procedure initModule(isNotPreview: boolean);
 {$IFDEF DEBUGFILE}
 var logfileBase: shortstring;
 {$IFNDEF MOBILE}var i: LongInt;{$ENDIF}
 {$ENDIF}
 begin
 {$IFDEF DEBUGFILE}
-    if isGame then
+    if isNotPreview then
     begin
         if GameType = gmtRecord then
             logfileBase:= 'rec'
@@ -422,7 +422,7 @@
 {$ENDIF}
 {$I-}
 {$IFDEF MOBILE}
-    {$IFDEF IPHONEOS} Assign(f,'../Documents/hw-' + logfileBase + '.log'); {$ENDIF}
+    {$IFDEF IPHONEOS} Assign(f, UserPathPrefix + '/hw-' + logfileBase + '.log'); {$ENDIF}
     {$IFDEF ANDROID} Assign(f,pathPrefix + '/' + logfileBase + '.log'); {$ENDIF}
     Rewrite(f);
 {$ELSE}
@@ -450,8 +450,6 @@
 
 procedure freeModule;
 begin
-recordFileName:= '';
-
 {$IFDEF DEBUGFILE}
     writeln(f, 'halt at ' + inttostr(GameTicks) + ' ticks. TurnTimeLeft = ' + inttostr(TurnTimeLeft));
     flush(f);