mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +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;
|
return null;
|
||||||
if (file.View.AsciiEqual (8, "__key__.dat\x00"))
|
if (file.View.AsciiEqual (8, "__key__.dat\x00"))
|
||||||
{
|
{
|
||||||
uint? key = QueryEncryptionInfo();
|
uint? key = QueryEncryptionInfo (file.Name);
|
||||||
if (null == key)
|
if (null == key)
|
||||||
throw new UnknownEncryptionScheme();
|
throw new UnknownEncryptionScheme();
|
||||||
return OpenEncrypted (file, entry_count, key.Value);
|
return OpenEncrypted (file, entry_count, key.Value);
|
||||||
@ -274,8 +274,11 @@ namespace GameRes.Formats.CatSystem
|
|||||||
return new GUI.CreateINTWidget();
|
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);
|
var options = Query<IntOptions> (arcStrings.INTNotice);
|
||||||
return options.EncryptionInfo.GetKey();
|
return options.EncryptionInfo.GetKey();
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ namespace GameRes.Formats.GUI
|
|||||||
CheckPathExists = true,
|
CheckPathExists = true,
|
||||||
Multiselect = false,
|
Multiselect = false,
|
||||||
Title = arcStrings.INTChooseExe,
|
Title = arcStrings.INTChooseExe,
|
||||||
Filter = arcStrings.INTExeFiles+"|*.exe",
|
Filter = arcStrings.INTExeFiles+"|*.exe;*.bin",
|
||||||
FilterIndex = 1,
|
FilterIndex = 1,
|
||||||
InitialDirectory = Directory.GetCurrentDirectory(),
|
InitialDirectory = Directory.GetCurrentDirectory(),
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user