From 0f64fd73ec0db69e01d7151b25782c629950e611 Mon Sep 17 00:00:00 2001 From: Aurora Date: Sat, 16 Apr 2016 20:27:52 +0200 Subject: [PATCH] Fix bug when quitting AGB_FIRM The wrong config.bin section was used to remember the last-used FIRM --- loader/source/main.c | 5 ++--- source/firm.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/loader/source/main.c b/loader/source/main.c index 19e0892..f783184 100644 --- a/loader/source/main.c +++ b/loader/source/main.c @@ -3,9 +3,8 @@ #include "fatfs/ff.h" #define PAYLOAD_ADDRESS 0x23F00000 - -#define BASE_PATH "/aurei/payloads/" -#define PAYLOAD_PATH(x) BASE_PATH x ".bin" +#define PAYLOADS_FOLDER "/aurei/payloads/" +#define PAYLOAD_PATH(a) PAYLOADS_FOLDER a ".bin" static u32 loadPayload(const char *path) { diff --git a/source/firm.c b/source/firm.c index 93248fe..fe0f7df 100755 --- a/source/firm.c +++ b/source/firm.c @@ -111,7 +111,7 @@ void main(void) if(previousFirm == 7) { nandType = 0; - firmSource = updatedSys ? 0 : BOOTCONFIG(0, 3); + firmSource = updatedSys ? 0 : BOOTCONFIG(2, 1); needConfig = 0; //Flag to prevent multiple boot options-forcing @@ -198,7 +198,7 @@ static inline void loadFirm(u32 firmType, u32 externalFirm) if(externalFirm) { - const char *path = "/aurei/firmware.bin"; + const char path[] = "/aurei/firmware.bin"; firmSize = fileSize(path); if(firmSize)