New button combos

No more complaints about triggering the cameras!
This commit is contained in:
Aurora 2016-02-20 23:25:00 +01:00
parent 9b58208c12
commit af83d31e8d
2 changed files with 9 additions and 10 deletions

View File

@ -36,10 +36,9 @@ u8 loadFirm(u8 a9lhBoot){
section = firmLocation->section; section = firmLocation->section;
/* If L and R are pressed on a 9.0/2 SysNAND, or L on an updated /* If L is pressed, and on an updated SysNAND setup the SAFE MODE combo
SysNAND, boot 9.0 FIRM */ is not pressed, boot 9.0 FIRM */
if((!updatedSys && (pressed & BUTTON_L1R1) == BUTTON_L1R1) || if((pressed & BUTTON_L1) && !(updatedSys && pressed == SAFEMODE)) mode = 0;
(updatedSys && (pressed & BUTTON_L1R1) == BUTTON_L1)) mode = 0;
//If not using an A9LH setup, do so by decrypting FIRM0 //If not using an A9LH setup, do so by decrypting FIRM0
if(!a9lhSetup && !mode){ if(!a9lhSetup && !mode){
@ -116,10 +115,10 @@ u8 loadEmu(void){
//Patches //Patches
u8 patchFirm(void){ u8 patchFirm(void){
/* If L is pressed on a 9.0/9.2 SysNAND, or L+R on a > 9.2 SysNAND, /* If L or R aren't pressed on a 9.0/9.2 SysNAND, or the 9.0 FIRM is selected
or the 9.0 FIRM is loaded on a > 9.2 SysNAND, boot emuNAND */ or R is pressed on a > 9.2 SysNAND, boot emuNAND */
if((updatedSys && (!mode || ((pressed & BUTTON_L1R1) == BUTTON_L1R1 && if((updatedSys && (!mode || ((pressed & BUTTON_R1) && pressed != SAFEMODE))) ||
pressed != SAFEMODE))) || (!updatedSys && mode && !(pressed & BUTTON_L1))){ (!updatedSys && mode && !(pressed & (BUTTON_L1 | BUTTON_R1)))){
if (loadEmu()) return 1; if (loadEmu()) return 1;
} }
else if(a9lhSetup){ else if(a9lhSetup){

View File

@ -10,10 +10,10 @@
#define PDN_MPCORE_CFG (*(u8*)0x10140FFC) #define PDN_MPCORE_CFG (*(u8*)0x10140FFC)
#define HID_PAD ((~*(u16*)0x10146000) & 0xFFF) #define HID_PAD ((~*(u16*)0x10146000) & 0xFFF)
#define BUTTON_L1R1 (3 << 8) #define BUTTON_R1 (1 << 8)
#define BUTTON_L1 (1 << 9) #define BUTTON_L1 (1 << 9)
#define BUTTON_A 1 #define BUTTON_A 1
#define SAFEMODE (BUTTON_L1R1 | BUTTON_A | (1 << 6)) #define SAFEMODE (BUTTON_L1 | BUTTON_R1 | BUTTON_A | (1 << 6))
#define PATCHED_FIRM_PATH "/rei/patched_firmware.bin" #define PATCHED_FIRM_PATH "/rei/patched_firmware.bin"
u8 loadFirm(u8 a9lhSetup); u8 loadFirm(u8 a9lhSetup);