New way of launching payloads (L+R/up/down/right/left/START/SELECT/B/X/Y)
This commit is contained in:
parent
b5eb108393
commit
02b5c69802
@ -8,14 +8,20 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define HID_PAD ((~*(vu16 *)0x10146000) & 0xFFF)
|
||||
#define BUTTON_R1 (1 << 8)
|
||||
#define BUTTON_L1 (1 << 9)
|
||||
#define BUTTON_L1R1 (BUTTON_R1 | BUTTON_L1)
|
||||
#define BUTTON_A 1
|
||||
#define BUTTON_B (1 << 1)
|
||||
#define BUTTON_UP (1 << 6)
|
||||
#define BUTTON_DOWN (1 << 7)
|
||||
#define BUTTON_START (1 << 3)
|
||||
#define BUTTON_SELECT (1 << 2)
|
||||
#define SAFEMODE (BUTTON_L1R1 | BUTTON_A | (1 << 6))
|
||||
#define HID_PAD ((~*(vu16 *)0x10146000) & 0xFFF)
|
||||
#define BUTTON_R1 (1 << 8)
|
||||
#define BUTTON_L1 (1 << 9)
|
||||
#define BUTTON_A 1
|
||||
#define BUTTON_B (1 << 1)
|
||||
#define BUTTON_X (1 << 10)
|
||||
#define BUTTON_Y (1 << 11)
|
||||
#define BUTTON_UP (1 << 6)
|
||||
#define BUTTON_DOWN (1 << 7)
|
||||
#define BUTTON_RIGHT (1 << 4)
|
||||
#define BUTTON_LEFT (1 << 5)
|
||||
#define BUTTON_START (1 << 3)
|
||||
#define BUTTON_SELECT (1 << 2)
|
||||
#define SAFE_MODE (BUTTON_R1 | BUTTON_L1 | BUTTON_A | BUTTON_UP)
|
||||
#define PAYLOAD_BUTTONS (BUTTON_R1 | BUTTON_UP | BUTTON_DOWN | BUTTON_RIGHT |\
|
||||
BUTTON_LEFT | BUTTON_START | BUTTON_SELECT | BUTTON_B |\
|
||||
BUTTON_X | BUTTON_Y)
|
||||
|
@ -77,7 +77,8 @@ void setupCFW(void){
|
||||
if(needConfig){
|
||||
|
||||
//If L and R are pressed, chainload an external payload
|
||||
if((pressed & BUTTON_L1R1) == BUTTON_L1R1) loadPayload();
|
||||
if((pressed & BUTTON_L1) && (pressed & PAYLOAD_BUTTONS) && pressed != SAFE_MODE)
|
||||
loadPayload();
|
||||
|
||||
//If no configuration file exists or SELECT is held, load configuration menu
|
||||
if(needConfig == 2 || (pressed & BUTTON_SELECT))
|
||||
@ -86,13 +87,13 @@ void setupCFW(void){
|
||||
//If screens are inited, load splash screen
|
||||
if(PDN_GPU_CNT != 0x1) loadSplash();
|
||||
|
||||
/* If L is pressed, and on an updated sysNAND setup the SAFE MODE combo
|
||||
/* If L is pressed, and on an updated sysNAND setup the Safe Mode combo
|
||||
is not pressed, boot 9.0 FIRM */
|
||||
if((pressed & BUTTON_L1) && !(updatedSys && pressed == SAFEMODE)) mode = 0;
|
||||
if((pressed & BUTTON_L1) && !(updatedSys && pressed == SAFE_MODE)) mode = 0;
|
||||
|
||||
/* If L or R aren't pressed on a 9.0/9.2 sysNAND, or the 9.0 FIRM is selected
|
||||
or R is pressed on a > 9.2 sysNAND, boot emuNAND */
|
||||
if((updatedSys && (!mode || ((pressed & BUTTON_R1) && pressed != SAFEMODE))) ||
|
||||
if((updatedSys && (!mode || ((pressed & BUTTON_R1) && pressed != SAFE_MODE))) ||
|
||||
(!updatedSys && mode && !(pressed & BUTTON_R1))){
|
||||
//If not 9.0 FIRM and B is pressed, attempt booting the second emuNAND
|
||||
if(mode && (pressed & BUTTON_B)) emuNAND = 2;
|
||||
|
Reference in New Issue
Block a user