1616#include "../fs/fsutils.h"
1717#include <soc/fuse.h>
1818#include "../utils/utils.h"
19+ #include "../config.h"
20+
21+ extern hekate_config h_cfg ;
1922
2023enum {
2124 MainExplore = 0 ,
3134 MainExit ,
3235 MainPowerOff ,
3336 MainRebootRCM ,
37+ MainRebootNormal ,
3438 MainRebootHekate ,
3539 MainRebootAMS
3640};
@@ -49,6 +53,7 @@ MenuEntry_t mainMenuEntries[] = {
4953 [MainExit ] = {.optionUnion = COLORTORGB (COLOR_WHITE ) | SKIPBIT , .name = "\n-- Exit --" },
5054 [MainPowerOff ] = {.optionUnion = COLORTORGB (COLOR_VIOLET ), .name = "Power off" },
5155 [MainRebootRCM ] = {.optionUnion = COLORTORGB (COLOR_VIOLET ), .name = "Reboot to RCM" },
56+ [MainRebootNormal ] = {.optionUnion = COLORTORGB (COLOR_VIOLET ), .name = "Reboot normally" },
5257 [MainRebootHekate ] = {.optionUnion = COLORTORGB (COLOR_VIOLET ), .name = "Reboot to bootloader/update.bin" },
5358 [MainRebootAMS ] = {.optionUnion = COLORTORGB (COLOR_VIOLET ), .name = "Reboot to atmosphere/reboot_payload.bin" }
5459};
@@ -99,7 +104,10 @@ void ViewKeys(){
99104
100105void ViewCredits (){
101106 gfx_clearscreen ();
102- 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 );
107+ gfx_printf ("\nTegraexplorer v%d.%d.%d\nBy SuchMemeManySkill\n\nBased on Lockpick_RCM & Hekate, from shchmue & CTCaer\n\n\n" , LP_VER_MJ , LP_VER_MN , LP_VER_BF );
108+
109+ if (hidRead ()-> r )
110+ gfx_printf ("%k\"I'm not even sure if it works\" - meme" , COLOR_ORANGE );
103111 hidWait ();
104112}
105113
@@ -132,9 +140,11 @@ menuPaths mainMenuPaths[] = {
132140 [MainRebootRCM ] = reboot_rcm ,
133141 [MainPowerOff ] = power_off ,
134142 [MainViewCredits ] = ViewCredits ,
143+ [MainRebootNormal ] = reboot_normal ,
135144};
136145
137146void EnterMainMenu (){
147+ int res = 0 ;
138148 while (1 ){
139149 if (sd_get_card_removed ())
140150 sd_unmount ();
@@ -152,8 +162,15 @@ void EnterMainMenu(){
152162 // -- Exit --
153163 mainMenuEntries [MainRebootAMS ].hide = (!sd_mounted || !FileExists ("sd:/atmosphere/reboot_payload.bin" ));
154164 mainMenuEntries [MainRebootHekate ].hide = (!sd_mounted || !FileExists ("sd:/bootloader/update.bin" ));
155-
156- FunctionMenuHandler (mainMenuEntries , ARR_LEN (mainMenuEntries ), mainMenuPaths , ALWAYSREDRAW );
165+ mainMenuEntries [MainRebootRCM ].hide = h_cfg .t210b01 ;
166+
167+ gfx_clearscreen ();
168+ gfx_putc ('\n' );
169+
170+ Vector_t ent = vecFromArray (mainMenuEntries , ARR_LEN (mainMenuEntries ), sizeof (MenuEntry_t ));
171+ res = newMenu (& ent , res , 79 , 30 , ALWAYSREDRAW , 0 );
172+ if (mainMenuPaths [res ] != NULL )
173+ mainMenuPaths [res ]();
157174 }
158175}
159176
0 commit comments