diff --git a/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs b/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs
index 55727a144d..51cb0ed6d3 100644
--- a/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs
+++ b/BizHawk.Emulation.DiscSystem/DiscFormats/CUE/CueFileResolver.cs
@@ -67,7 +67,9 @@ namespace BizHawk.Emulation.DiscSystem.CUE
///
/// 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.
///
public List 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();
foreach (var fi in results)