(ConsoleBrowser): fixed formats lookup.

This commit is contained in:
poddav 2022-04-29 13:20:58 +04:00
parent a9633988b4
commit 9fb61e1e76

View File

@ -90,7 +90,7 @@ namespace GARbro
return; return;
} }
var tag = args[argn+1]; var tag = args[argn+1];
m_image_format = FindFormat (tag); m_image_format = ImageFormat.FindByTag (tag);
if (null == m_image_format) if (null == m_image_format)
{ {
Console.Error.WriteLine ("{0}: unknown format specified", tag); Console.Error.WriteLine ("{0}: unknown format specified", tag);
@ -126,12 +126,12 @@ namespace GARbro
{ {
VFS.ChDir (m_arc_name); VFS.ChDir (m_arc_name);
} }
catch (Exception X) catch (Exception)
{ {
Console.Error.WriteLine ("{0}: unknown format", m_arc_name); Console.Error.WriteLine ("{0}: unknown format", m_arc_name);
continue; continue;
} }
var arc = (ArchiveFileSystem)VFS.Top; var arc = ((ArchiveFileSystem)VFS.Top).Source;
if (args.Length > argn+1) if (args.Length > argn+1)
{ {
for (int i = argn+1; i < args.Length; ++i) for (int i = argn+1; i < args.Length; ++i)
@ -170,6 +170,7 @@ namespace GARbro
Console.WriteLine ("Usage: gameres [OPTIONS] ARC [ENTRIES]"); Console.WriteLine ("Usage: gameres [OPTIONS] ARC [ENTRIES]");
Console.WriteLine (" -l list recognized archive formats"); Console.WriteLine (" -l list recognized archive formats");
Console.WriteLine (" -x extract all files"); Console.WriteLine (" -x extract all files");
Console.WriteLine (" -c FORMAT convert images to specified format");
Console.WriteLine ("Without options displays contents of specified archive."); Console.WriteLine ("Without options displays contents of specified archive.");
} }