diff --git a/injector/source/patcher.c b/injector/source/patcher.c index 04180b8..531ff51 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -408,7 +408,7 @@ void patchCode(u64 progId, u8 *code, u32 size) case 0x0004001000027000LL: // KOR MSET case 0x0004001000028000LL: // TWN MSET { - if(CONFIG(5)) + if(CONFIG(4)) { static const u16 verPattern[] = u"Ver."; const u32 currentNand = BOOTCONFIG(0, 3); @@ -543,7 +543,7 @@ void patchCode(u64 progId, u8 *code, u32 size) } default: - if(CONFIG(4)) + if(CONFIG(3)) { u32 tidHigh = (progId & 0xFFFFFFF000000000LL) >> 0x24; diff --git a/source/config.c b/source/config.c index 3cbae4a..17f13de 100644 --- a/source/config.c +++ b/source/config.c @@ -40,7 +40,6 @@ void configureCFW(const char *configPath) const char *singleOptionsText[] = { "( ) Autoboot SysNAND", "( ) SysNAND is updated (A9LH-only)", - "( ) Force A9LH detection", "( ) Use second EmuNAND as default", "( ) Enable region/language emu. and ext. .code", "( ) Show current NAND in System Settings", diff --git a/source/draw.c b/source/draw.c index f162346..ae34f46 100644 --- a/source/draw.c +++ b/source/draw.c @@ -46,8 +46,8 @@ bool loadSplash(void) //Don't delay boot if no splash image is on the SD if(fileRead(fb->top_left, "/luma/splash.bin") + - fileRead(fb->bottom, "/luma/splashbottom.bin") != 0) - return true; + fileRead(fb->bottom, "/luma/splashbottom.bin") != 0) return true; + return false; } diff --git a/source/firm.c b/source/firm.c index 0464bc1..cc9279f 100755 --- a/source/firm.c +++ b/source/firm.c @@ -93,24 +93,15 @@ void main(void) firmType = NATIVE_FIRM; //Determine if booting with A9LH - bool a9lhBoot = !PDN_SPI_CNT; + isA9lh = !PDN_SPI_CNT; - //Determine if A9LH is installed and the user has an updated sysNAND - if(a9lhBoot || CONFIG(2)) - { - isA9lh = true; - updatedSys = CONFIG(1); - } - else - { - isA9lh = false; - updatedSys = false; - } + //Determine if the user has an updated sysNAND + updatedSys = isA9lh ? CONFIG(1) : false; newConfig = (u32)isA9lh << 3; //If it's a MCU reboot, try to force boot options - if(a9lhBoot && CFG_BOOTENV) + if(isA9lh && CFG_BOOTENV) { //Always force a sysNAND boot when quitting AGB_FIRM if(CFG_BOOTENV == 7) @@ -149,7 +140,7 @@ void main(void) pressed = HID_PAD; } - if(a9lhBoot && !CFG_BOOTENV && pressed == SAFE_MODE) + if(isA9lh && !CFG_BOOTENV && pressed == SAFE_MODE) { nandType = FIRMWARE_SYSNAND; firmSource = FIRMWARE_SYSNAND; @@ -165,7 +156,7 @@ void main(void) loadPayload(pressed); //If screens are inited or the corresponding option is set, load splash screen - if((PDN_GPU_CNT != 1 || CONFIG(7)) && loadSplash()) + if((PDN_GPU_CNT != 1 || CONFIG(6)) && loadSplash()) { nbChronoStarted = 2; chrono(0); @@ -188,7 +179,7 @@ void main(void) /* If we're booting emuNAND the second emuNAND is set as default and B isn't pressed, or vice-versa, boot the second emuNAND */ - if(nandType != FIRMWARE_SYSNAND && (CONFIG(3) == !(pressed & BUTTON_B))) nandType = FIRMWARE_EMUNAND2; + if(nandType != FIRMWARE_SYSNAND && (CONFIG(2) == !(pressed & BUTTON_B))) nandType = FIRMWARE_EMUNAND2; } } diff --git a/source/patches.c b/source/patches.c index f4eb9ae..9ad3f45 100644 --- a/source/patches.c +++ b/source/patches.c @@ -157,7 +157,7 @@ void applyLegacyFirmPatches(u8 *pos, FirmwareType firmType) /* Calculate the amount of patches to apply. Only count the boot screen patch for AGB_FIRM if the matching option was enabled (keep it as last) */ u32 numPatches = firmType == TWL_FIRM ? (sizeof(twlPatches) / sizeof(patchData)) : - (sizeof(agbPatches) / sizeof(patchData) - !CONFIG(6)); + (sizeof(agbPatches) / sizeof(patchData) - !CONFIG(5)); const patchData *patches = firmType == TWL_FIRM ? twlPatches : agbPatches; //Patch