equal
deleted
inserted
replaced
524 |
524 |
525 {$ENDIF} |
525 {$ENDIF} |
526 end; |
526 end; |
527 |
527 |
528 procedure AddFileLogRaw(s: pchar); cdecl; |
528 procedure AddFileLogRaw(s: pchar); cdecl; |
|
529 var tmp: shortstring; |
529 begin |
530 begin |
530 s:= s; |
531 s:= s; |
531 {$IFNDEF PAS2C} |
532 {$IFNDEF PAS2C} |
532 {$IFDEF DEBUGFILE} |
533 {$IFDEF DEBUGFILE} |
533 {$IFDEF USE_VIDEO_RECORDING} |
534 {$IFDEF USE_VIDEO_RECORDING} |
534 if SDL_LockMutex(logMutex) <> 0 then |
535 if SDL_LockMutex(logMutex) <> 0 then |
535 OutError('Logging mutex could not be locked!', true); |
536 OutError('Logging mutex could not be locked!', true); |
536 {$ENDIF} |
537 {$ENDIF} |
537 // TODO: uncomment next two lines |
538 tmp:= IntToStr(GameTicks) + ': '; |
538 // write(logFile, s); |
539 if (logFile <> nil) then |
539 // flush(logFile); |
540 begin |
|
541 pfsWriteRaw(logFile, Str2PChar(tmp), StrLen(Str2PChar(tmp))); |
|
542 pfsWriteRaw(logFile, s, StrLen(s)); |
|
543 end |
|
544 else |
|
545 begin |
|
546 Write(stdout, Str2PChar(tmp)); |
|
547 Flush(stdout); |
|
548 end; |
540 {$IFDEF USE_VIDEO_RECORDING} |
549 {$IFDEF USE_VIDEO_RECORDING} |
541 if SDL_UnlockMutex(logMutex) <> 0 then |
550 if SDL_UnlockMutex(logMutex) <> 0 then |
542 OutError('Logging mutex could not be unlocked!', true); |
551 OutError('Logging mutex could not be unlocked!', true); |
543 {$ENDIF} |
552 {$ENDIF} |
544 {$ENDIF} |
553 {$ENDIF} |