AddFileLog tweak, added [Con] to each line hedgeroid
authorXeli
Thu, 04 Aug 2011 17:22:37 +0200
branchhedgeroid
changeset 5460 c33b4daa4ce4
parent 5458 c3d01ba3ba3c
child 5463 83c53a80f7ff
AddFileLog tweak, added [Con] to each line
hedgewars/uConsole.pas
--- a/hedgewars/uConsole.pas	Thu Aug 04 17:21:13 2011 +0200
+++ b/hedgewars/uConsole.pas	Thu Aug 04 17:22:37 2011 +0200
@@ -26,7 +26,7 @@
 procedure WriteToConsole(s: shortstring);
 procedure WriteLnToConsole(s: shortstring);
 function  GetLastConsoleLine: shortstring;
-function ShortStringAsPChar(var s: shortstring): PChar;
+function ShortStringAsPChar(s: shortstring): PChar;
 
 implementation
 uses Types, uVariables, uUtils {$IFDEF ANDROID}, log in 'log.pas'{$ENDIF};
@@ -54,7 +54,7 @@
 begin
 {$IFNDEF NOCONSOLE}
  {$IFDEF ANDROID}
-  Log.__android_log_write(Log.Android_LOG_DEBUG, 'HW_Engine', ShortStringAsPChar(s));
+  Log.__android_log_write(Log.Android_LOG_DEBUG, 'HW_Engine', ShortStringAsPChar('[Con]' + s));
 {$ELSE}
 AddFileLog('[Con] ' + s);
 Write(stderr, s);
@@ -125,7 +125,7 @@
 
 end;
 
-Function ShortStringAsPChar(var S: ShortString) : PChar;
+Function ShortStringAsPChar(S: ShortString) : PChar;
 Var NewString : String;
 Begin
 if Length(S) = High(S) then Dec(S[0]);