mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 17:05:37 +08:00
(FormatCatalog.LookupGame): look for archive name, too.
This commit is contained in:
parent
f1d66206bc
commit
a648aff032
@ -214,10 +214,12 @@ namespace GameRes
|
|||||||
/// <returns>Game title, or null if no match was found.</returns>
|
/// <returns>Game title, or null if no match was found.</returns>
|
||||||
public string LookupGame (string arc_name, string pattern = "*.exe")
|
public string LookupGame (string arc_name, string pattern = "*.exe")
|
||||||
{
|
{
|
||||||
|
string title;
|
||||||
|
if (m_game_map.TryGetValue (Path.GetFileName (arc_name), out title))
|
||||||
|
return title;
|
||||||
pattern = VFS.CombinePath (VFS.GetDirectoryName (arc_name), pattern);
|
pattern = VFS.CombinePath (VFS.GetDirectoryName (arc_name), pattern);
|
||||||
foreach (var file in VFS.GetFiles (pattern).Select (e => Path.GetFileName (e.Name)))
|
foreach (var file in VFS.GetFiles (pattern).Select (e => Path.GetFileName (e.Name)))
|
||||||
{
|
{
|
||||||
string title;
|
|
||||||
if (m_game_map.TryGetValue (file, out title))
|
if (m_game_map.TryGetValue (file, out title))
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user