Explorar o código

added frame number to logger output

Alexander Hendrich %!s(int64=11) %!d(string=hai) anos
pai
achega
e7a221bcff
Modificáronse 2 ficheiros con 4 adicións e 1 borrados
  1. 3 1
      bbiwarg/Utility/Logger.cs
  2. 1 0
      bbiwarg/VideoHandle.cs

+ 3 - 1
bbiwarg/Utility/Logger.cs

@@ -20,10 +20,12 @@ namespace bbiwarg.Utility
     }
     static class Logger
     {
+        public static int CurrentFrame { get; set; }
+
         public static void log(string message, LogSubject subject)
         {
             if (Constants.LogLevel.HasFlag(subject))
-                Console.WriteLine(message);
+                Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
         }
     }
 }

+ 1 - 0
bbiwarg/VideoHandle.cs

@@ -128,6 +128,7 @@ namespace bbiwarg
 
         private void processFrameUpdate()
         {
+            Logger.CurrentFrame = CurrentFrame;
             bool newStarted = (lastFrame - CurrentFrame >= 20);
             Timer.start("processFrameUpdate");