mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Rely on b9s key setup if the 0xBEEF magic is found
This commit is contained in:
parent
2cc94be6b4
commit
564f403f4c
@ -1620,7 +1620,7 @@ u32 SplashInit() {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 GodMode() {
|
u32 GodMode(bool is_b9s) {
|
||||||
const u32 quick_stp = (MAIN_SCREEN == TOP_SCREEN) ? 20 : 19;
|
const u32 quick_stp = (MAIN_SCREEN == TOP_SCREEN) ? 20 : 19;
|
||||||
u32 exit_mode = GODMODE_EXIT_REBOOT;
|
u32 exit_mode = GODMODE_EXIT_REBOOT;
|
||||||
|
|
||||||
@ -1648,7 +1648,7 @@ u32 GodMode() {
|
|||||||
|
|
||||||
InitSDCardFS();
|
InitSDCardFS();
|
||||||
AutoEmuNandBase(true);
|
AutoEmuNandBase(true);
|
||||||
InitNandCrypto(true);
|
InitNandCrypto(!is_b9s);
|
||||||
InitExtFS();
|
InitExtFS();
|
||||||
|
|
||||||
GetDirContents(current_dir, "");
|
GetDirContents(current_dir, "");
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
#define GODMODE_EXIT_REBOOT 0
|
#define GODMODE_EXIT_REBOOT 0
|
||||||
#define GODMODE_EXIT_POWEROFF 1
|
#define GODMODE_EXIT_POWEROFF 1
|
||||||
|
|
||||||
u32 GodMode();
|
u32 GodMode(bool is_b9s);
|
||||||
|
@ -4,13 +4,12 @@
|
|||||||
|
|
||||||
void main(int argc, char** argv)
|
void main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
(void) argc; // unused for now
|
|
||||||
(void) argv; // unused for now
|
(void) argv; // unused for now
|
||||||
|
|
||||||
// Screen on
|
// Screen on
|
||||||
ScreenOn();
|
ScreenOn();
|
||||||
|
|
||||||
// Run the main program
|
// Run the main program
|
||||||
if (GodMode() == GODMODE_EXIT_REBOOT) Reboot();
|
if (GodMode(argc) == GODMODE_EXIT_REBOOT) Reboot();
|
||||||
else PowerOff();
|
else PowerOff();
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ bool InitNandCrypto(bool init_full)
|
|||||||
LoadKeyFromFile(slot0x05KeyY, 0x05, 'Y', NULL);
|
LoadKeyFromFile(slot0x05KeyY, 0x05, 'Y', NULL);
|
||||||
|
|
||||||
// part #4: AGBSAVE CMAC KEY (set up on A9LH and SigHax)
|
// part #4: AGBSAVE CMAC KEY (set up on A9LH and SigHax)
|
||||||
if (IS_A9LH || IS_SIGHAX)
|
if (init_full && (IS_A9LH || IS_SIGHAX))
|
||||||
LoadKeyFromFile(NULL, 0x24, 'Y', NULL);
|
LoadKeyFromFile(NULL, 0x24, 'Y', NULL);
|
||||||
|
|
||||||
// part #5: FULL INIT
|
// part #5: FULL INIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user