From 7dacc07a7d2ff32e229558203937b12c9cc2fbe3 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 2 Jul 2015 00:22:10 -0500 Subject: [PATCH] quick cleanup of spammy cue loading console output --- BizHawk.Emulation.DiscSystem/CUE/CUE_Compile.cs | 2 ++ BizHawk.Emulation.DiscSystem/Jobs/DiscMountJob.cs | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/BizHawk.Emulation.DiscSystem/CUE/CUE_Compile.cs b/BizHawk.Emulation.DiscSystem/CUE/CUE_Compile.cs index 3aa8314116..bc228d0e83 100644 --- a/BizHawk.Emulation.DiscSystem/CUE/CUE_Compile.cs +++ b/BizHawk.Emulation.DiscSystem/CUE/CUE_Compile.cs @@ -348,6 +348,8 @@ namespace BizHawk.Emulation.DiscSystem index0.FileMSF = index1.FileMSF; //same MSF as index 1 will make it effectively nonexistent //well now, if it's the first in the file, an implicit index will take its value from 00:00:00 in the file + //this is the kind of thing I sought to solve originally by 'interpreting' the file, but it seems easy enough to handle this way + //my carlin.cue tests this but test cases shouldnt be hard to find if (curr_track.IsFirstInFile) index0.FileMSF = new Timestamp(0); diff --git a/BizHawk.Emulation.DiscSystem/Jobs/DiscMountJob.cs b/BizHawk.Emulation.DiscSystem/Jobs/DiscMountJob.cs index cd5d5e18cc..b04127ade9 100644 --- a/BizHawk.Emulation.DiscSystem/Jobs/DiscMountJob.cs +++ b/BizHawk.Emulation.DiscSystem/Jobs/DiscMountJob.cs @@ -124,7 +124,8 @@ namespace BizHawk.Emulation.DiscSystem cue_content = File.ReadAllText(cuePath); parseJob.IN_CueString = cue_content; cue2.ParseCueFile(parseJob); - if (parseJob.OUT_Log != "") Console.WriteLine(parseJob.OUT_Log); + //TODO - need better handling of log output + if (!string.IsNullOrEmpty(parseJob.OUT_Log)) Console.WriteLine(parseJob.OUT_Log); ConcatenateJobLog(parseJob); //compile the cue file: @@ -133,7 +134,8 @@ namespace BizHawk.Emulation.DiscSystem compileJob.IN_CueFormat = cue2; compileJob.IN_CueFile = parseJob.OUT_CueFile; compileJob.Run(); - if (compileJob.OUT_Log != "") Console.WriteLine(compileJob.OUT_Log); + //TODO - need better handling of log output + if (!string.IsNullOrEmpty(compileJob.OUT_Log)) Console.WriteLine(compileJob.OUT_Log); ConcatenateJobLog(compileJob); //check slow loading threshold @@ -147,7 +149,8 @@ namespace BizHawk.Emulation.DiscSystem var loadJob = new CUE_Format2.LoadCueJob(); loadJob.IN_CompileJob = compileJob; loadJob.Run(); - if (loadJob.OUT_Log != "") Console.WriteLine(loadJob.OUT_Log); + //TODO - need better handling of log output + if (!string.IsNullOrEmpty(loadJob.OUT_Log)) Console.WriteLine(loadJob.OUT_Log); ConcatenateJobLog(loadJob); OUT_Disc = loadJob.OUT_Disc;