mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(INT): added scheme lookup by executable name.
This commit is contained in:
parent
c499d4c707
commit
8724e8131c
@ -128,7 +128,7 @@ namespace GameRes.Formats.CatSystem
|
||||
return null;
|
||||
if (file.View.AsciiEqual (8, "__key__.dat\x00"))
|
||||
{
|
||||
uint? key = QueryEncryptionInfo();
|
||||
uint? key = QueryEncryptionInfo (file.Name);
|
||||
if (null == key)
|
||||
throw new UnknownEncryptionScheme();
|
||||
return OpenEncrypted (file, entry_count, key.Value);
|
||||
@ -274,8 +274,11 @@ namespace GameRes.Formats.CatSystem
|
||||
return new GUI.CreateINTWidget();
|
||||
}
|
||||
|
||||
uint? QueryEncryptionInfo ()
|
||||
uint? QueryEncryptionInfo (string arc_name)
|
||||
{
|
||||
var title = FormatCatalog.Instance.LookupGame (arc_name);
|
||||
if (!string.IsNullOrEmpty (title) && KnownSchemes.ContainsKey (title))
|
||||
return KnownSchemes[title].Key;
|
||||
var options = Query<IntOptions> (arcStrings.INTNotice);
|
||||
return options.EncryptionInfo.GetKey();
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ namespace GameRes.Formats.GUI
|
||||
CheckPathExists = true,
|
||||
Multiselect = false,
|
||||
Title = arcStrings.INTChooseExe,
|
||||
Filter = arcStrings.INTExeFiles+"|*.exe",
|
||||
Filter = arcStrings.INTExeFiles+"|*.exe;*.bin",
|
||||
FilterIndex = 1,
|
||||
InitialDirectory = Directory.GetCurrentDirectory(),
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user