Add reboot normally option, hide reboot to rcm on mariko

On mariko, rebooting normally will bypass fuses
This commit is contained in:
suchmememanyskill
2021-01-21 17:59:49 +01:00
parent 7862a15e1d
commit 0129039d76
5 changed files with 34 additions and 22 deletions

View File

@@ -9,17 +9,24 @@
#include "../gfx/menu.h"
#include "../hid/hid.h"
#include "../fs/fsutils.h"
#include "../config.h"
extern hekate_config h_cfg;
extern int launch_payload(char *path);
void ALWAYS_INLINE power_off(){
power_set_state(POWER_OFF);
power_set_state(POWER_OFF_RESET);
}
void ALWAYS_INLINE reboot_rcm(){
power_set_state(REBOOT_RCM);
}
void ALWAYS_INLINE reboot_normal(){
power_set_state((h_cfg.t210b01) ? REBOOT_BYPASS_FUSES : POWER_OFF_REBOOT);
}
void RebootToPayloadOrRcm(){
if (FileExists("sd:/atmosphere/reboot_payload.bin"))
launch_payload("sd:/atmosphere/reboot_payload.bin");

View File

@@ -11,4 +11,5 @@ void RebootToPayloadOrRcm();
char *ShowKeyboard(const char *toEdit, u8 alwaysRet);
void power_off();
void reboot_rcm();
void reboot_rcm();
void reboot_normal();