From b6969cf0d106d4a1834969b715066daf60a95634 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Fri, 13 May 2016 09:15:40 +0200 Subject: [PATCH] Make "Enable developer features" the last option for compatibility with the master branch --- injector/source/patcher.c | 4 ++-- source/config.c | 4 ++-- source/config.h | 2 ++ source/firm.c | 12 +++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/injector/source/patcher.c b/injector/source/patcher.c index 587d83c..e5f5363 100644 --- a/injector/source/patcher.c +++ b/injector/source/patcher.c @@ -163,7 +163,7 @@ static int loadTitleLocaleConfig(u64 progId, u8 *regionId, u8 *languageId) break; } } - + for(u32 i = 0; i < 12; ++i) { static const char *languages[] = {"JP", "EN", "FR", "DE", "IT", "ES", "ZH", "KO", "NL", "PT", "RU", "TW"}; @@ -381,7 +381,7 @@ void patchCode(u64 progId, u8 *code, u32 size) case 0x0004001000027000LL: // KOR MSET case 0x0004001000028000LL: // TWN MSET { - if(CONFIG(6)) + if(CONFIG(5)) { static const u16 verPattern[] = u"Ver."; const u32 currentNand = BOOTCONFIG(0, 3); diff --git a/source/config.c b/source/config.c index 743bb24..d78f44c 100644 --- a/source/config.c +++ b/source/config.c @@ -25,10 +25,10 @@ void configureCFW(const char *configPath) "( ) Force A9LH detection", "( ) Use second EmuNAND as default", "( ) Enable region/language emulation", - "( ) Enable developer features", "( ) Show current NAND in System Settings", "( ) Show GBA boot screen in patched AGB_FIRM", - "( ) Enable splash screen with no screen-init" }; + "( ) Enable splash screen with no screen-init", + "( ) Enable developer features" }; struct multiOption { int posXs[4]; diff --git a/source/config.h b/source/config.h index a667930..7c94e15 100644 --- a/source/config.h +++ b/source/config.h @@ -10,6 +10,8 @@ #define MULTICONFIG(a) ((config >> (a * 2 + 6)) & 3) #define BOOTCONFIG(a, b) ((config >> a) & b) +#define DEVMODE CONFIG(8) + extern u32 config; void configureCFW(const char *configPath); \ No newline at end of file diff --git a/source/firm.c b/source/firm.c index 49280b3..75938fb 100755 --- a/source/firm.c +++ b/source/firm.c @@ -118,9 +118,7 @@ void main(void) pressed = HID_PAD; } - u32 devMode = CONFIG(5); - - if(devMode) + if(DEVMODE) { detectAndProcessExceptionDumps(); installArm9Handlers(); @@ -190,11 +188,11 @@ void main(void) { /* If L and R/A/Select or one of the single payload buttons are pressed, chainload an external payload */ - if(devMode || (pressed & SINGLE_PAYLOAD_BUTTONS) || ((pressed & BUTTON_L1) && (pressed & L_PAYLOAD_BUTTONS))) + if(DEVMODE || (pressed & SINGLE_PAYLOAD_BUTTONS) || ((pressed & BUTTON_L1) && (pressed & L_PAYLOAD_BUTTONS))) loadPayload(pressed); //If screens are inited or the corresponding option is set, load splash screen - if((PDN_GPU_CNT != 1 || CONFIG(8)) && loadSplash()) + if((PDN_GPU_CNT != 1 || CONFIG(7)) && loadSplash()) { chronoStarted = 2; chrono(0); @@ -368,7 +366,7 @@ static inline void patchNativeFirm(u32 nandType, u32 emuHeader, u32 a9lhMode) //Does nothing if svcBackdoor is still there if(nativeFirmType == 1) reimplementSvcBackdoor(); - if(CONFIG(5)) + if(DEVMODE) { //Apply UNITINFO patch u8 *unitInfoOffset = getUnitInfoValueSet(arm9Section, section[2].size); @@ -523,7 +521,7 @@ static inline void patchLegacyFirm(u32 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 == 1 ? (sizeof(twlPatches) / sizeof(patchData)) : - (sizeof(agbPatches) / sizeof(patchData) - !CONFIG(7)); + (sizeof(agbPatches) / sizeof(patchData) - !CONFIG(6)); const patchData *patches = firmType == 1 ? twlPatches : agbPatches; //Patch