mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
hactoolnet: Add Title Name to NCA output
When displaying an NCA containing an NPDM in the code partition, display the title name.
This commit is contained in:
parent
c7f2f28a81
commit
d2cf1ecb1f
1 changed files with 9 additions and 0 deletions
|
@ -232,6 +232,15 @@ namespace hactoolnet
|
|||
PrintItem(sb, colLen, $"NPDM Signature{nca.VerifySignature2().GetValidityString()}:", nca.Header.Signature2.ToArray());
|
||||
PrintItem(sb, colLen, "Content Size:", $"0x{nca.Header.NcaSize:x12}");
|
||||
PrintItem(sb, colLen, "TitleID:", $"{nca.Header.TitleId:X16}");
|
||||
if (nca.CanOpenSection(NcaSectionType.Code)) {
|
||||
IFileSystem fs = nca.OpenFileSystem(NcaSectionType.Code, IntegrityCheckLevel.None);
|
||||
Result r = fs.OpenFile(out var file, "/main.npdm", OpenMode.Read);
|
||||
if (r.IsSuccess()) {
|
||||
NpdmBinary npdm = new NpdmBinary(file.AsStream(), null);
|
||||
PrintItem(sb, colLen, "Title Name:", npdm.TitleName);
|
||||
}
|
||||
}
|
||||
|
||||
PrintItem(sb, colLen, "SDK Version:", nca.Header.SdkVersion);
|
||||
PrintItem(sb, colLen, "Distribution type:", nca.Header.DistributionType);
|
||||
PrintItem(sb, colLen, "Content Type:", nca.Header.ContentType);
|
||||
|
|
Loading…
Reference in a new issue