mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
core/file_sys: Add alternative override pathes for ExeFS files
You can now directly place ExeFS overrides/patches inside the mod folder (instead of the exefs subfolder). This allows us to have drop-in compatibility with Luma3DS mods.
This commit is contained in:
parent
5b54a99f96
commit
9d57325a8b
@ -539,9 +539,11 @@ Loader::ResultStatus NCCHContainer::ApplyCodePatch(std::vector<u8>& code) const
|
|||||||
const auto mods_path =
|
const auto mods_path =
|
||||||
fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
|
fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
|
||||||
GetModId(ncch_header.program_id));
|
GetModId(ncch_header.program_id));
|
||||||
const std::array<PatchLocation, 4> patch_paths{{
|
const std::array<PatchLocation, 6> patch_paths{{
|
||||||
{mods_path + "exefs/code.ips", Patch::ApplyIpsPatch},
|
{mods_path + "exefs/code.ips", Patch::ApplyIpsPatch},
|
||||||
{mods_path + "exefs/code.bps", Patch::ApplyBpsPatch},
|
{mods_path + "exefs/code.bps", Patch::ApplyBpsPatch},
|
||||||
|
{mods_path + "code.ips", Patch::ApplyIpsPatch},
|
||||||
|
{mods_path + "code.bps", Patch::ApplyBpsPatch},
|
||||||
{filepath + ".exefsdir/code.ips", Patch::ApplyIpsPatch},
|
{filepath + ".exefsdir/code.ips", Patch::ApplyIpsPatch},
|
||||||
{filepath + ".exefsdir/code.bps", Patch::ApplyBpsPatch},
|
{filepath + ".exefsdir/code.bps", Patch::ApplyBpsPatch},
|
||||||
}};
|
}};
|
||||||
@ -583,8 +585,9 @@ Loader::ResultStatus NCCHContainer::LoadOverrideExeFSSection(const char* name,
|
|||||||
const auto mods_path =
|
const auto mods_path =
|
||||||
fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
|
fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
|
||||||
GetModId(ncch_header.program_id));
|
GetModId(ncch_header.program_id));
|
||||||
std::array<std::string, 2> override_paths{{
|
std::array<std::string, 3> override_paths{{
|
||||||
mods_path + "exefs/" + override_name,
|
mods_path + "exefs/" + override_name,
|
||||||
|
mods_path + override_name,
|
||||||
filepath + ".exefsdir/" + override_name,
|
filepath + ".exefsdir/" + override_name,
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user