Minor code syntax stuff
This commit is contained in:
parent
a3cb6a622d
commit
fbf8a1b6d9
@ -78,14 +78,14 @@ void writeConfig(bool isConfigOptions)
|
||||
|
||||
void configMenu(bool oldPinStatus, u32 oldPinMode)
|
||||
{
|
||||
const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )",
|
||||
static const char *multiOptionsText[] = { "Default EmuNAND: 1( ) 2( ) 3( ) 4( )",
|
||||
"Screen brightness: 4( ) 3( ) 2( ) 1( )",
|
||||
"Splash: Off( ) Before( ) After( ) payloads",
|
||||
"PIN lock: Off( ) 4( ) 6( ) 8( ) digits",
|
||||
"New 3DS CPU: Off( ) Clock( ) L2( ) Clock+L2( )",
|
||||
};
|
||||
|
||||
const char *singleOptionsText[] = { "( ) Autoboot EmuNAND",
|
||||
static const char *singleOptionsText[] = { "( ) Autoboot EmuNAND",
|
||||
"( ) Use EmuNAND FIRM if booting with R",
|
||||
"( ) Enable loading external FIRMs and modules",
|
||||
"( ) Enable game patching",
|
||||
@ -96,7 +96,7 @@ void configMenu(bool oldPinStatus, u32 oldPinMode)
|
||||
"( ) Disable ARM11 exception handlers",
|
||||
};
|
||||
|
||||
const char *optionsDescription[] = { "Select the default EmuNAND.\n\n"
|
||||
static const char *optionsDescription[] = { "Select the default EmuNAND.\n\n"
|
||||
"It will be booted when no\n"
|
||||
"directional pad buttons are pressed.",
|
||||
|
||||
|
@ -84,7 +84,6 @@ void detectAndProcessExceptionDumps(void)
|
||||
0b1111, 0b1000, 0b10110, 0b10
|
||||
};
|
||||
|
||||
|
||||
initScreens();
|
||||
|
||||
drawString(true, 10, 10, COLOR_RED, "An exception occurred");
|
||||
@ -93,16 +92,18 @@ void detectAndProcessExceptionDumps(void)
|
||||
else posY = drawString(true, 10, 30, COLOR_WHITE, "Processor: ARM9");
|
||||
|
||||
const char *faultStatusInfos = NULL;
|
||||
if (dumpHeader->type >= 2)
|
||||
if(dumpHeader->type >= 2)
|
||||
{
|
||||
u32 xfsr = dumpHeader->type == 2 ? regs[18] : regs[17];
|
||||
xfsr &= 0xF;
|
||||
for (int i = 0; i < 15; i++)
|
||||
if (xfsr == faultStatusValues[i]){
|
||||
for(u32 i = 0; i < 15; i++)
|
||||
if(xfsr == faultStatusValues[i])
|
||||
{
|
||||
faultStatusInfos = faultStatusNames[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(dumpHeader->type == 2)
|
||||
{
|
||||
if((regs[16] & 0x20) == 0 && dumpHeader->codeDumpSize >= 4)
|
||||
@ -126,7 +127,8 @@ void detectAndProcessExceptionDumps(void)
|
||||
}
|
||||
else
|
||||
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Exception type: %s", handledExceptionNames[dumpHeader->type]);
|
||||
if (faultStatusInfos != NULL) posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Fault status: %s", faultStatusInfos);
|
||||
|
||||
if(faultStatusInfos != NULL) posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "Fault status: %s", faultStatusInfos);
|
||||
|
||||
if(dumpHeader->processor == 11 && dumpHeader->additionalDataSize != 0)
|
||||
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE,
|
||||
@ -142,8 +144,9 @@ void detectAndProcessExceptionDumps(void)
|
||||
else if(dumpHeader->processor == 11)
|
||||
posY = drawFormattedString(true, 10 + 22 * SPACING_X, posY, COLOR_WHITE, "%-7s%08X", registerNames[i + 1], regs[20]);
|
||||
}
|
||||
if (dumpHeader->type == 3)
|
||||
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "%-7s%08X Access type: %s", "FAR", regs[19], regs[17] & (1u << 11) ? "Write":"Read");
|
||||
|
||||
if(dumpHeader->type == 3)
|
||||
posY = drawFormattedString(true, 10, posY + SPACING_Y, COLOR_WHITE, "%-7s%08X Access type: %s", "FAR", regs[19], regs[17] & (1u << 11) ? "Write" : "Read");
|
||||
|
||||
posY += SPACING_Y;
|
||||
|
||||
|
@ -108,7 +108,7 @@ static bool checkFirm(u32 firmSize)
|
||||
|
||||
static inline u32 loadFirmFromStorage(FirmwareType firmType)
|
||||
{
|
||||
const char *firmwareFiles[] = {
|
||||
static const char *firmwareFiles[] = {
|
||||
"native.firm",
|
||||
"twl.firm",
|
||||
"agb.firm",
|
||||
|
@ -251,7 +251,7 @@ bool payloadMenu(char *path)
|
||||
|
||||
u32 firmRead(void *dest, u32 firmType)
|
||||
{
|
||||
const char *firmFolders[][2] = {{"00000002", "20000002"},
|
||||
static const char *firmFolders[][2] = {{"00000002", "20000002"},
|
||||
{"00000102", "20000102"},
|
||||
{"00000202", "20000202"},
|
||||
{"00000003", "20000003"},
|
||||
|
Reference in New Issue
Block a user