-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
68 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <3ds.h> | ||
#include <string.h> | ||
#include "luma.h" | ||
#include "util.h" | ||
|
||
u32 getKExtSize(void) | ||
{ | ||
s64 val; | ||
Result res = svcGetSystemInfo(&val, 0x10000, 0x300); | ||
return R_FAILED(res) ? 0 : (u32)val; | ||
} | ||
|
||
bool isTitleLaunchPrevented(u64 titleId) | ||
{ | ||
s64 numKips = 0; | ||
|
||
svcGetSystemInfo(&numKips, 26, 0); | ||
return numKips >= 6 && (titleId & ~N3DS_TID_BIT) == 0x0004003000008A02ULL; // ErrDisp | ||
} | ||
|
||
Result fsRegSetupPermissionsForKip(u32 pid, u64 titleId) | ||
{ | ||
FS_ProgramInfo info; | ||
|
||
ExHeader_Arm11StorageInfo storageInfo = { | ||
.fs_access_info = FSACCESS_NANDRO_RW | FSACCESS_NANDRW | FSACCESS_SDMC_RW, | ||
}; | ||
|
||
// Non-dummy TID | ||
info.programId = titleId; | ||
info.mediaType = MEDIATYPE_NAND; | ||
|
||
return FSREG_Register(pid, 0xFFFF000000000000LL, &info, &storageInfo);; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#include <3ds/types.h> | ||
|
||
u32 getKExtSize(void); | ||
bool isTitleLaunchPrevented(u64 titleId); | ||
Result fsRegSetupPermissionsForKip(u32 pid, u64 titleId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters