Fix derp (3)
This commit is contained in:
parent
0306556032
commit
1fcab825bf
@ -172,7 +172,7 @@ static inline bool loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageI
|
|||||||
|
|
||||||
IFile file;
|
IFile file;
|
||||||
|
|
||||||
if(R_FAILED(openLumaFile(&file, path))) return 0;
|
if(R_FAILED(openLumaFile(&file, path))) return true;
|
||||||
|
|
||||||
bool ret;
|
bool ret;
|
||||||
u64 fileSize;
|
u64 fileSize;
|
||||||
|
@ -164,6 +164,7 @@ static inline u32 patchMpu(u8 *pos, u32 size)
|
|||||||
u32 patchEmuNand(u8 *arm9Section, u32 kernel9Size, u8 *process9Offset, u32 process9Size, u32 emuHeader, u8 *kernel9Address)
|
u32 patchEmuNand(u8 *arm9Section, u32 kernel9Size, u8 *process9Offset, u32 process9Size, u32 emuHeader, u8 *kernel9Address)
|
||||||
{
|
{
|
||||||
u8 *freeK9Space;
|
u8 *freeK9Space;
|
||||||
|
|
||||||
if(!getFreeK9Space(arm9Section, kernel9Size, &freeK9Space)) return 1;
|
if(!getFreeK9Space(arm9Section, kernel9Size, &freeK9Space)) return 1;
|
||||||
|
|
||||||
u32 ret = 0;
|
u32 ret = 0;
|
||||||
|
@ -89,7 +89,7 @@ void detectAndProcessExceptionDumps(void)
|
|||||||
{
|
{
|
||||||
volatile ExceptionDumpHeader *dumpHeader = (volatile ExceptionDumpHeader *)0x25000000;
|
volatile ExceptionDumpHeader *dumpHeader = (volatile ExceptionDumpHeader *)0x25000000;
|
||||||
|
|
||||||
if(dumpHeader->magic[0] != 0xDEADC0DE || dumpHeader->magic[1] == 0xDEADCAFE || (dumpHeader->processor != 9 && dumpHeader->processor != 11)) return;
|
if(dumpHeader->magic[0] != 0xDEADC0DE || dumpHeader->magic[1] != 0xDEADCAFE || (dumpHeader->processor != 9 && dumpHeader->processor != 11)) return;
|
||||||
|
|
||||||
const vu32 *regs = (vu32 *)((vu8 *)dumpHeader + sizeof(ExceptionDumpHeader));
|
const vu32 *regs = (vu32 *)((vu8 *)dumpHeader + sizeof(ExceptionDumpHeader));
|
||||||
const vu8 *stackDump = (vu8 *)regs + dumpHeader->registerDumpSize + dumpHeader->codeDumpSize;
|
const vu8 *stackDump = (vu8 *)regs + dumpHeader->registerDumpSize + dumpHeader->codeDumpSize;
|
||||||
|
13
source/fs.c
13
source/fs.c
@ -38,23 +38,17 @@ static FATFS sdFs,
|
|||||||
static bool switchToMainDir(bool isSd)
|
static bool switchToMainDir(bool isSd)
|
||||||
{
|
{
|
||||||
const char *mainDir = isSd ? "/luma" : "/rw/luma";
|
const char *mainDir = isSd ? "/luma" : "/rw/luma";
|
||||||
bool ret;
|
|
||||||
|
|
||||||
switch(f_chdir(mainDir))
|
switch(f_chdir(mainDir))
|
||||||
{
|
{
|
||||||
case FR_OK:
|
case FR_OK:
|
||||||
ret = true;
|
return true;
|
||||||
break;
|
|
||||||
case FR_NO_PATH:
|
case FR_NO_PATH:
|
||||||
f_mkdir(mainDir);
|
f_mkdir(mainDir);
|
||||||
ret = switchToMainDir(isSd);
|
return switchToMainDir(isSd);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ret = false;
|
return false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mountFs(bool isSd, bool switchToCtrNand)
|
bool mountFs(bool isSd, bool switchToCtrNand)
|
||||||
@ -191,6 +185,7 @@ void payloadMenu(void)
|
|||||||
while(f_readdir(&dir, &info) == FR_OK && info.fname[0] != 0 && payloadNum < 20)
|
while(f_readdir(&dir, &info) == FR_OK && info.fname[0] != 0 && payloadNum < 20)
|
||||||
{
|
{
|
||||||
if(info.fname[0] == '.' || memcmp(info.altname + 8, ".BIN", 4) != 0) continue;
|
if(info.fname[0] == '.' || memcmp(info.altname + 8, ".BIN", 4) != 0) continue;
|
||||||
|
|
||||||
u32 nameLength = strlen(info.fname) - 4;
|
u32 nameLength = strlen(info.fname) - 4;
|
||||||
|
|
||||||
if(nameLength > 48) continue;
|
if(nameLength > 48) continue;
|
||||||
|
Reference in New Issue
Block a user