Small tweaks

- swap crash for credits
- home now reboots to atmosphere/reboot_payload.bin, or rcm if not found
This commit is contained in:
suchmememanyskill
2021-01-01 11:43:31 +01:00
parent a39b3b2460
commit b818b577e9
6 changed files with 26 additions and 17 deletions

View File

@@ -22,10 +22,10 @@ enum {
MainBrowseEmmc,
MainBrowseEmummc,
MainTools,
MainCauseException,
MainPartitionSd,
MainDumpFw,
MainViewKeys,
MainViewCredits,
MainExit,
MainPowerOff,
MainRebootRCM,
@@ -40,10 +40,10 @@ MenuEntry_t mainMenuEntries[] = {
[MainBrowseEmmc] = {.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Browse EMMC"},
[MainBrowseEmummc] = {.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Browse EMUMMC"},
[MainTools] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Tools --"},
[MainCauseException] = {.optionUnion = COLORTORGB(COLOR_RED), .name = "Cause an exception"},
[MainPartitionSd] = {.optionUnion = COLORTORGB(COLOR_ORANGE), .name = "Partition the sd"},
[MainDumpFw] = {.optionUnion = COLORTORGB(COLOR_BLUE), .name = "Dump Firmware"},
[MainViewKeys] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "View dumped keys"},
[MainViewCredits] = {.optionUnion = COLORTORGB(COLOR_YELLOW), .name = "Credits"},
[MainExit] = {.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "\n-- Exit --"},
[MainPowerOff] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Power off"},
[MainRebootRCM] = {.optionUnion = COLORTORGB(COLOR_VIOLET), .name = "Reboot to RCM"},
@@ -70,10 +70,6 @@ void HandleEMUMMC(){
GptMenu(MMC_CONN_EMUMMC);
}
void CrashTE(){
gfx_printf("%d", *((int*)0));
}
void ViewKeys(){
gfx_clearscreen();
for (int i = 0; i < 3; i++){
@@ -93,6 +89,12 @@ void ViewKeys(){
hidWait();
}
void ViewCredits(){
gfx_clearscreen();
gfx_printf("\nTegraexplorer v%d.%d.%d\nBy SuchMemeManySkill\n\nBased on Lockpick_RCM & Hekate, from shchmue & CTCaer", LP_VER_MJ, LP_VER_MN, LP_VER_BF);
hidWait();
}
extern bool sd_mounted;
extern bool is_sd_inited;
extern int launch_payload(char *path);
@@ -114,7 +116,6 @@ menuPaths mainMenuPaths[] = {
[MainMountSd] = MountOrUnmountSD,
[MainBrowseEmmc] = HandleEMMC,
[MainBrowseEmummc] = HandleEMUMMC,
[MainCauseException] = CrashTE,
[MainPartitionSd] = FormatSD,
[MainDumpFw] = DumpSysFw,
[MainViewKeys] = ViewKeys,
@@ -122,6 +123,7 @@ menuPaths mainMenuPaths[] = {
[MainRebootHekate] = RebootToHekate,
[MainRebootRCM] = reboot_rcm,
[MainPowerOff] = power_off,
[MainViewCredits] = ViewCredits,
};
void EnterMainMenu(){