mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 09:35:27 +00:00
mods: Fix crash when loading via LoadCart (#1388)
This commit is contained in:
parent
2900dda633
commit
16dafe6316
|
@ -69,6 +69,8 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
Npdm metaData = ReadNpdm(codeFs);
|
Npdm metaData = ReadNpdm(codeFs);
|
||||||
|
|
||||||
|
_fileSystem.ModLoader.CollectMods(TitleId, _fileSystem.GetBaseModsPath());
|
||||||
|
|
||||||
if (TitleId != 0)
|
if (TitleId != 0)
|
||||||
{
|
{
|
||||||
EnsureSaveData(new TitleId(TitleId));
|
EnsureSaveData(new TitleId(TitleId));
|
||||||
|
|
|
@ -451,8 +451,12 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
internal bool ApplyNsoPatches(ulong titleId, params IExecutable[] programs)
|
internal bool ApplyNsoPatches(ulong titleId, params IExecutable[] programs)
|
||||||
{
|
{
|
||||||
AppMods.TryGetValue(titleId, out ModCache mods);
|
IEnumerable<Mod<DirectoryInfo>> nsoMods = Patches.NsoPatches;
|
||||||
var nsoMods = Patches.NsoPatches.Concat(mods.ExefsDirs);
|
|
||||||
|
if (AppMods.TryGetValue(titleId, out ModCache mods))
|
||||||
|
{
|
||||||
|
nsoMods = nsoMods.Concat(mods.ExefsDirs);
|
||||||
|
}
|
||||||
|
|
||||||
// NSO patches are created with offset 0 according to Atmosphere's patcher module
|
// NSO patches are created with offset 0 according to Atmosphere's patcher module
|
||||||
// But `Program` doesn't contain the header which is 0x100 bytes. So, we adjust for that here
|
// But `Program` doesn't contain the header which is 0x100 bytes. So, we adjust for that here
|
||||||
|
|
Loading…
Reference in a new issue