Support reading patched titles from the SD card

This commit is contained in:
Alex Barney 2018-07-07 17:47:03 -05:00
parent 18bb3d8531
commit 346e50b949
2 changed files with 12 additions and 1 deletions

View file

@ -156,7 +156,7 @@ namespace hactoolnet
return; return;
} }
var section = title.MainNca.Sections.FirstOrDefault(x => x.Type == SectionType.Romfs); var section = title.MainNca.Sections.FirstOrDefault(x => x?.Type == SectionType.Romfs || x?.Type == SectionType.Bktr);
if (section == null) if (section == null)
{ {

View file

@ -160,6 +160,17 @@ namespace libhac
app.AddTitle(title); app.AddTitle(title);
} }
foreach (var app in Applications.Values)
{
var main = app.Main?.MainNca;
var patch = app.Patch?.MainNca;
if (main != null)
{
patch?.SetBaseNca(main);
}
}
} }
internal static Stream OpenSplitNcaStream(string path) internal static Stream OpenSplitNcaStream(string path)