aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes')
-rw-r--r--Game/Code/Classes/UGraphic.pas4
-rw-r--r--Game/Code/Classes/ULog.pas4
2 files changed, 8 insertions, 0 deletions
diff --git a/Game/Code/Classes/UGraphic.pas b/Game/Code/Classes/UGraphic.pas
index bcb2aa65..0dae93a6 100644
--- a/Game/Code/Classes/UGraphic.pas
+++ b/Game/Code/Classes/UGraphic.pas
@@ -316,6 +316,10 @@ begin
Log.BenchmarkStart(3);
LoadScreens;
+
+ if Log.NumErrors>0 then
+ ScreenMain.ShowNumErrors := true;
+
Display.ActualScreen^.FadeTo(@ScreenMain);
Log.BenchmarkEnd(2);
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas
index ce6d5f07..ed7855bd 100644
--- a/Game/Code/Classes/ULog.pas
+++ b/Game/Code/Classes/ULog.pas
@@ -14,6 +14,8 @@ type
FileError: TextFile;
FileErrorO: boolean; // opened
+ NumErrors: integer;
+
Title: String; //Application Title
//Should Log Files be written
@@ -145,6 +147,7 @@ procedure TLog.LogError(Text: string);
begin
if Enabled AND (not FileErrorO) then begin
FileErrorO := true;
+ NumErrors := 0;
AssignFile(FileError, LogPath + 'Error.log');
{$I-}
Rewrite(FileError);
@@ -166,6 +169,7 @@ begin
try
WriteLn(FileError, Text);
Flush(FileError);
+ Inc(NumErrors);
except
FileErrorO := false;
end;