equal
deleted
inserted
replaced
350 {$IFDEF DEBUGFILE} |
350 {$IFDEF DEBUGFILE} |
351 |
351 |
352 {$IFDEF USE_VIDEO_RECORDING} |
352 {$IFDEF USE_VIDEO_RECORDING} |
353 EnterCriticalSection(logMutex); |
353 EnterCriticalSection(logMutex); |
354 {$ENDIF} |
354 {$ENDIF} |
355 pfsWriteLn(logFile, inttostr(GameTicks) + ': ' + s); |
355 if logFile <> nil then |
|
356 pfsWriteLn(logFile, inttostr(GameTicks) + ': ' + s) |
|
357 else |
|
358 WriteLn(stdout, inttostr(GameTicks) + ': ' + s); |
356 |
359 |
357 {$IFDEF USE_VIDEO_RECORDING} |
360 {$IFDEF USE_VIDEO_RECORDING} |
358 LeaveCriticalSection(logMutex); |
361 LeaveCriticalSection(logMutex); |
359 {$ENDIF} |
362 {$ENDIF} |
360 |
363 |
542 logFile:= pfsOpenWrite('/Logs/' + logfileBase + inttostr(i) + '.log'); |
545 logFile:= pfsOpenWrite('/Logs/' + logfileBase + inttostr(i) + '.log'); |
543 if logFile <> nil then |
546 if logFile <> nil then |
544 break; |
547 break; |
545 inc(i) |
548 inc(i) |
546 end; |
549 end; |
|
550 |
|
551 if logFile = nil then |
|
552 WriteLn(stdout, '[WARNING] Could not open log file for writing. Log will be written to stdout!'); |
547 {$ENDIF} |
553 {$ENDIF} |
548 |
554 |
549 //mobile stuff |
555 //mobile stuff |
550 {$IFDEF IPHONEOS} |
556 {$IFDEF IPHONEOS} |
551 mobileRecord.PerformRumble:= @AudioServicesPlaySystemSound; |
557 mobileRecord.PerformRumble:= @AudioServicesPlaySystemSound; |