Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dram55/MarioMaker2OCR
Browse files Browse the repository at this point in the history
  • Loading branch information
dram55 committed Aug 3, 2019
2 parents 8a2c64c + 3528b3d commit f325bcb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MarioMaker2OCR/VideoProcessing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public void processingLoop()
bool WasClear = false;
bool WaitForClearStats = false;
int skip = frameSize.Width / 50;
DateTime blackStart = DateTime.Now;

while (true)
{
Expand All @@ -202,6 +203,10 @@ public void processingLoop()
if (WasBlack)
{
WasBlack = isBlackFrame(hues);
if(!WasBlack)
{
log.Debug(String.Format("Black Screen Length: {0}", DateTime.Now.Subtract(blackStart).TotalMilliseconds / 1000));
}
}
else if (WasClear)
{
Expand All @@ -224,6 +229,7 @@ public void processingLoop()
{
WasBlack = true;
WaitForClearStats = false; // XXX: If we get a black screen and this is true, something weird is going on
blackStart = DateTime.Now;
VideoEventArgs args = new VideoEventArgs();
args.frameBuffer = copyFrameBuffer();
args.currentFrame = getLevelScreenImageFromBuffer(args.frameBuffer);
Expand Down

0 comments on commit f325bcb

Please sign in to comment.