From c9c373f6078466085c185ba4f5fd908ae02a7999 Mon Sep 17 00:00:00 2001 From: Aurora Date: Mon, 15 Aug 2016 13:11:27 +0200 Subject: [PATCH] Move stuff from firm.c --- source/config.c | 2 ++ source/draw.c | 2 ++ source/firm.c | 18 ++---------------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/source/config.c b/source/config.c index a16bdf7..6949b7e 100644 --- a/source/config.c +++ b/source/config.c @@ -201,4 +201,6 @@ void configureCFW(const char *configPath) //Wait for the pressed buttons to change while(HID_PAD == BUTTON_START); + + chrono(2); } \ No newline at end of file diff --git a/source/draw.c b/source/draw.c index 2dfbea3..b23bc09 100644 --- a/source/draw.c +++ b/source/draw.c @@ -51,6 +51,8 @@ bool loadSplash(void) fileRead(fb->top_left, "/luma/splash.bin"); fileRead(fb->bottom, "/luma/splashbottom.bin"); + chrono(3); + return true; } diff --git a/source/firm.c b/source/firm.c index 71043aa..fa619f3 100755 --- a/source/firm.c +++ b/source/firm.c @@ -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)