Move stuff from firm.c

This commit is contained in:
Aurora 2016-08-15 13:11:27 +02:00
parent aa7c2c0009
commit c9c373f607
3 changed files with 6 additions and 16 deletions

View File

@ -201,4 +201,6 @@ void configureCFW(const char *configPath)
//Wait for the pressed buttons to change
while(HID_PAD == BUTTON_START);
chrono(2);
}

View File

@ -51,6 +51,8 @@ bool loadSplash(void)
fileRead(fb->top_left, "/luma/splash.bin");
fileRead(fb->bottom, "/luma/splashbottom.bin");
chrono(3);
return true;
}

View File

@ -150,11 +150,6 @@ void main(void)
if(!pinExists && CONFIG(7)) pin = newPin();
//Zero the last booted FIRM flag
CFG_BOOTENV = 0;
chrono(2);
//Update pressed buttons
pressed = HID_PAD;
}
@ -169,23 +164,14 @@ void main(void)
{
/* If L and R/A/Select or one of the single payload buttons are pressed,
chainload an external payload (the PIN, if any, has been verified)*/
if(CONFIG(6) && loadSplash())
{
chrono(3);
//Update pressed buttons
pressed = HID_PAD;
}
if(CONFIG(6) && loadSplash()) pressed = HID_PAD;
bool shouldLoadPayload = (pressed & SINGLE_PAYLOAD_BUTTONS) || ((pressed & BUTTON_L1) && (pressed & L_PAYLOAD_BUTTONS));
if(shouldLoadPayload) loadPayload(pressed);
if(!CONFIG(6) && loadSplash())
{
chrono(3);
}
if(!CONFIG(6)) loadSplash();
//If R is pressed, boot the non-updated NAND with the FIRM of the opposite one
if(pressed & BUTTON_R1)