Add exceptions, start file menu
This commit is contained in:
@@ -7,16 +7,19 @@
|
||||
#include "../fs/menus/explorer.h"
|
||||
#include <utils/btn.h>
|
||||
#include <storage/nx_sd.h>
|
||||
#include "tconf.h"
|
||||
|
||||
MenuEntry_t mainMenuEntries[] = {
|
||||
{.R = 255, .G = 255, .B = 255, .skip = 1, .name = "-- Main Menu --"},
|
||||
{.G = 255, .name = "SD:/"},
|
||||
{.B = 255, .G = 255, .name = "Test Controllers"},
|
||||
{.R = 255, .name = "Cause an exception"},
|
||||
{.R = 255, .name = "Reboot to payload"}
|
||||
};
|
||||
|
||||
void HandleSD(){
|
||||
gfx_clearscreen();
|
||||
TConf.curExplorerLoc = LOC_SD;
|
||||
if (!sd_mount()){
|
||||
gfx_printf("Sd is not mounted!");
|
||||
hidWait();
|
||||
@@ -25,16 +28,21 @@ void HandleSD(){
|
||||
FileExplorer("sd:/");
|
||||
}
|
||||
|
||||
void CrashTE(){
|
||||
gfx_printf("%d", *((int*)0));
|
||||
}
|
||||
|
||||
menuPaths mainMenuPaths[] = {
|
||||
NULL,
|
||||
HandleSD,
|
||||
TestControllers,
|
||||
CrashTE,
|
||||
RebootToPayload
|
||||
};
|
||||
|
||||
void EnterMainMenu(){
|
||||
while (1){
|
||||
FunctionMenuHandler(mainMenuEntries, 4, mainMenuPaths, 0);
|
||||
FunctionMenuHandler(mainMenuEntries, ARR_LEN(mainMenuEntries), mainMenuPaths, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user