mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 14:05:17 -04:00
loader: add support for title-specific override keys
This commit is contained in:
parent
dcf44e406e
commit
eefee8c7a8
5 changed files with 181 additions and 81 deletions
|
@ -71,11 +71,14 @@ FILE *NsoUtils::OpenNso(unsigned int index, u64 title_id) {
|
|||
if ((ecs = ContentManagement::GetExternalContentSource(title_id)) != nullptr) {
|
||||
return OpenNsoFromECS(index, ecs);
|
||||
}
|
||||
|
||||
/* First, check HBL. */
|
||||
if (ContentManagement::ShouldOverrideContentsWithHBL(title_id)) {
|
||||
return OpenNsoFromHBL(index);
|
||||
}
|
||||
|
||||
if (ContentManagement::ShouldOverrideContents(title_id)) {
|
||||
if (ContentManagement::ShouldReplaceWithHBL(title_id)) {
|
||||
return OpenNsoFromHBL(index);
|
||||
}
|
||||
/* Next, check secondary override. */
|
||||
if (ContentManagement::ShouldOverrideContentsWithSD(title_id)) {
|
||||
FILE *f_out = OpenNsoFromSdCard(index, title_id);
|
||||
if (f_out != NULL) {
|
||||
return f_out;
|
||||
|
@ -83,6 +86,8 @@ FILE *NsoUtils::OpenNso(unsigned int index, u64 title_id) {
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Finally, default to exefs. */
|
||||
return OpenNsoFromExeFS(index);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue