cue files - prefer a pre-decoded wav over an mp3 with the same filename
This commit is contained in:
parent
0787a3be47
commit
60c3eb9883
|
@ -67,7 +67,9 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
/// <summary>
|
||||
/// Performs cue-intelligent logic to acquire a file requested by the cue.
|
||||
/// Returns the resulting full path(s).
|
||||
/// If there are multiple options, it returns them all
|
||||
/// If there are multiple options, it returns them all.
|
||||
/// Returns the requested path first in the list (if it was found) for more simple use.
|
||||
/// Kind of an unusual design, I know. Consider them sorted by confidence.
|
||||
/// </summary>
|
||||
public List<string> Resolve(string path)
|
||||
{
|
||||
|
@ -109,8 +111,13 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
//match files with another extension added on (likely to be mygame.bin.ecm)
|
||||
cmp = string.Compare(fragment, targetFile, !caseSensitive);
|
||||
if (cmp == 0)
|
||||
results.Add(fi.FileInfo);
|
||||
|
||||
{
|
||||
//take care to add an exact match at the beginning
|
||||
if (fi.FullName.ToLowerInvariant() == Path.Combine(baseDir,path).ToLowerInvariant())
|
||||
results.Insert(0, fi.FileInfo);
|
||||
else
|
||||
results.Add(fi.FileInfo);
|
||||
}
|
||||
}
|
||||
var ret = new List<string>();
|
||||
foreach (var fi in results)
|
||||
|
|
Loading…
Reference in New Issue