Fix derp (3)

This commit is contained in:
Aurora 2016-11-15 20:18:28 +01:00
parent 0306556032
commit 1fcab825bf
5 changed files with 8 additions and 12 deletions

View File

@ -172,7 +172,7 @@ static inline bool loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageI
IFile file;
if(R_FAILED(openLumaFile(&file, path))) return 0;
if(R_FAILED(openLumaFile(&file, path))) return true;
bool ret;
u64 fileSize;

View File

@ -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)
{
u8 *freeK9Space;
if(!getFreeK9Space(arm9Section, kernel9Size, &freeK9Space)) return 1;
u32 ret = 0;

View File

@ -89,7 +89,7 @@ void detectAndProcessExceptionDumps(void)
{
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 vu8 *stackDump = (vu8 *)regs + dumpHeader->registerDumpSize + dumpHeader->codeDumpSize;

View File

@ -38,23 +38,17 @@ static FATFS sdFs,
static bool switchToMainDir(bool isSd)
{
const char *mainDir = isSd ? "/luma" : "/rw/luma";
bool ret;
switch(f_chdir(mainDir))
{
case FR_OK:
ret = true;
break;
return true;
case FR_NO_PATH:
f_mkdir(mainDir);
ret = switchToMainDir(isSd);
break;
return switchToMainDir(isSd);
default:
ret = false;
break;
return false;
}
return ret;
}
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)
{
if(info.fname[0] == '.' || memcmp(info.altname + 8, ".BIN", 4) != 0) continue;
u32 nameLength = strlen(info.fname) - 4;
if(nameLength > 48) continue;