equal
deleted
inserted
replaced
41 cAltDamage : boolean = true; |
41 cAltDamage : boolean = true; |
42 cReducedQuality : LongInt = rqNone; |
42 cReducedQuality : LongInt = rqNone; |
43 //userNick is in uChat |
43 //userNick is in uChat |
44 recordFileName : shortstring = ''; |
44 recordFileName : shortstring = ''; |
45 cReadyDelay : Longword = 5000; |
45 cReadyDelay : Longword = 5000; |
|
46 cLogfileBase : shortstring = 'debug'; |
46 ////////////////////////// |
47 ////////////////////////// |
47 |
48 |
48 isCursorVisible : boolean; |
49 isCursorVisible : boolean; |
49 isTerminated : boolean; |
50 isTerminated : boolean; |
50 isInLag : boolean; |
51 isInLag : boolean; |
806 SDLwindow := nil; |
807 SDLwindow := nil; |
807 {$ENDIF} |
808 {$ENDIF} |
808 {$IFDEF DEBUGFILE} |
809 {$IFDEF DEBUGFILE} |
809 {$I-} |
810 {$I-} |
810 {$IFDEF IPHONEOS} |
811 {$IFDEF IPHONEOS} |
811 Assign(f,'../Documents/debug.txt'); |
812 Assign(f,'../Documents/hw-' + cLogfileBase + '.log'); |
812 Rewrite(f); |
813 Rewrite(f); |
813 {$ELSE} |
814 {$ELSE} |
814 if (ParamStr(1) <> '') and (ParamStr(2) <> '') then |
815 if (ParamStr(1) <> '') and (ParamStr(2) <> '') then |
815 if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then |
816 if (ParamCount <> 3) and (ParamCount <> cDefaultParamNum) then |
816 begin |
817 begin |
817 for i:= 0 to 7 do |
818 for i:= 0 to 7 do |
818 begin |
819 begin |
819 assign(f, ExtractFileDir(ParamStr(2)) + '/debug' + inttostr(i) + '.txt'); |
820 assign(f, ExtractFileDir(ParamStr(2)) + '/Logs/' + cLogfileBase + inttostr(i) + '.log'); |
820 rewrite(f); |
821 rewrite(f); |
821 if IOResult = 0 then break; |
822 if IOResult = 0 then break; |
822 end; |
823 end; |
823 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
824 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
824 end |
825 end |
825 else |
826 else |
826 begin |
827 begin |
827 for i:= 0 to 7 do |
828 for i:= 0 to 7 do |
828 begin |
829 begin |
829 assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt'); |
830 assign(f, ParamStr(1) + '/Logs/' + cLogfileBase + inttostr(i) + '.log'); |
830 rewrite(f); |
831 rewrite(f); |
831 if IOResult = 0 then break; |
832 if IOResult = 0 then break; |
832 end; |
833 end; |
833 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
834 if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr |
834 end |
835 end |