throw slightly more descriptive warning when loading a cue with a missing bin
This commit is contained in:
parent
2a8ed31cbf
commit
66c2d48e8d
|
@ -269,6 +269,9 @@ namespace BizHawk.Client.Common
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (discMountJob.OUT_ErrorLevel)
|
||||||
|
throw new InvalidOperationException(discMountJob.OUT_Log);
|
||||||
|
|
||||||
if(disc == null)
|
if(disc == null)
|
||||||
throw new InvalidOperationException("Can't load one of the files specified in the M3U");
|
throw new InvalidOperationException("Can't load one of the files specified in the M3U");
|
||||||
|
|
||||||
|
@ -324,6 +327,10 @@ namespace BizHawk.Client.Common
|
||||||
System.Windows.Forms.MessageBox.Show("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk");
|
System.Windows.Forms.MessageBox.Show("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (discMountJob.OUT_ErrorLevel)
|
||||||
|
throw new InvalidOperationException(discMountJob.OUT_Log);
|
||||||
|
|
||||||
var disc = discMountJob.OUT_Disc;
|
var disc = discMountJob.OUT_Disc;
|
||||||
//-----------
|
//-----------
|
||||||
|
|
||||||
|
@ -457,6 +464,9 @@ namespace BizHawk.Client.Common
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (discMountJob.OUT_ErrorLevel)
|
||||||
|
throw new InvalidOperationException(discMountJob.OUT_Log);
|
||||||
|
|
||||||
if (disc == null)
|
if (disc == null)
|
||||||
throw new InvalidOperationException("Can't load one of the files specified in the M3U");
|
throw new InvalidOperationException("Can't load one of the files specified in the M3U");
|
||||||
|
|
||||||
|
|
|
@ -223,7 +223,9 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
||||||
string choice = null;
|
string choice = null;
|
||||||
if (options.Count == 0)
|
if (options.Count == 0)
|
||||||
{
|
{
|
||||||
Error("Couldn't resolve referenced cue file: " + f.Path);
|
Error(string.Format("Couldn't resolve referenced cue file: {0} ; you can commonly repair the cue file yourself, or a file might be missing", f.Path));
|
||||||
|
//add a null entry to keep the count from being wrong later (quiets a warning)
|
||||||
|
OUT_CompiledCueFiles.Add(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -303,6 +305,7 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
||||||
Error("Cue file doesn't specify any input files!");
|
Error("Cue file doesn't specify any input files!");
|
||||||
|
|
||||||
//we can't reliably analyze the length of files here, because we might have to be decoding to get lengths (VBR mp3s)
|
//we can't reliably analyze the length of files here, because we might have to be decoding to get lengths (VBR mp3s)
|
||||||
|
//REMINDER: we could actually scan the mp3 frames in software
|
||||||
//So, it's not really worth the trouble. We'll cope with lengths later
|
//So, it's not really worth the trouble. We'll cope with lengths later
|
||||||
//we could check the format of the wav file here, though
|
//we could check the format of the wav file here, though
|
||||||
|
|
||||||
|
@ -311,6 +314,8 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
||||||
OUT_LoadTime = 0;
|
OUT_LoadTime = 0;
|
||||||
foreach (var cfi in OUT_CompiledCueFiles)
|
foreach (var cfi in OUT_CompiledCueFiles)
|
||||||
{
|
{
|
||||||
|
if (cfi == null)
|
||||||
|
continue;
|
||||||
if (cfi.Type == CompiledCueFileType.DecodeAudio)
|
if (cfi.Type == CompiledCueFileType.DecodeAudio)
|
||||||
{
|
{
|
||||||
needsCodec = true;
|
needsCodec = true;
|
||||||
|
@ -477,6 +482,8 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
||||||
|
|
||||||
CreateTrack1Pregap();
|
CreateTrack1Pregap();
|
||||||
FinalAnalysis();
|
FinalAnalysis();
|
||||||
|
|
||||||
|
FinishLog();
|
||||||
|
|
||||||
} //Run()
|
} //Run()
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,8 @@ namespace BizHawk.Emulation.DiscSystem
|
||||||
//TODO - need better handling of log output
|
//TODO - need better handling of log output
|
||||||
if (!string.IsNullOrEmpty(compileJob.OUT_Log)) Console.WriteLine(compileJob.OUT_Log);
|
if (!string.IsNullOrEmpty(compileJob.OUT_Log)) Console.WriteLine(compileJob.OUT_Log);
|
||||||
ConcatenateJobLog(compileJob);
|
ConcatenateJobLog(compileJob);
|
||||||
|
if (compileJob.OUT_ErrorLevel)
|
||||||
|
goto DONE;
|
||||||
|
|
||||||
//check slow loading threshold
|
//check slow loading threshold
|
||||||
if (compileJob.OUT_LoadTime >= IN_SlowLoadAbortThreshold)
|
if (compileJob.OUT_LoadTime >= IN_SlowLoadAbortThreshold)
|
||||||
|
@ -180,6 +182,7 @@ namespace BizHawk.Emulation.DiscSystem
|
||||||
OUT_Disc = ccdLoader.LoadCCDToDisc(IN_FromPath, IN_DiscMountPolicy);
|
OUT_Disc = ccdLoader.LoadCCDToDisc(IN_FromPath, IN_DiscMountPolicy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DONE:
|
DONE:
|
||||||
|
|
||||||
//setup the lowest level synth provider
|
//setup the lowest level synth provider
|
||||||
|
|
|
@ -55,8 +55,8 @@ namespace BizHawk.Emulation.DiscSystem
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is a convenient format for storing the TOC (taken from mednafen)
|
/// This is a convenient format for storing the TOC (taken from mednafen)
|
||||||
/// Index 0 is empty, so that track 1 is in index 1.
|
/// Element 0 is the Lead-in track
|
||||||
/// Index 100 is the Lead-out track
|
/// Element 100 is the Lead-out track
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TOCItem[] TOCItems = new TOCItem[101];
|
public TOCItem[] TOCItems = new TOCItem[101];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue