1
0
Fork 0
mirror of https://github.com/suchmememanyskill/TegraExplorer.git synced 2024-11-08 13:11:54 +00:00

Tidy up code a bit

This commit is contained in:
Such Meme, Many Skill 2019-12-12 13:18:43 +01:00
parent c0f930e75d
commit 8151afb446
2 changed files with 10 additions and 22 deletions

View file

@ -54,6 +54,7 @@ void fillmainmenu(){
for (i = 0; i < MAINMENU_AMOUNT; i++){
switch (i + 1) {
case 1:
case 5:
if (sd_mounted)
mainmenu[i].property = 1;
else
@ -69,12 +70,6 @@ void fillmainmenu(){
strcpy(mainmenu[i].name, "\nMount SD");
}
break;
case 5:
if (sd_mounted)
mainmenu[i].property = 1;
else
mainmenu[i].property = -1;
break;
}
}
}
@ -134,22 +129,15 @@ void te_main(){
case SD_FORMAT:
res = makemenu(formatmenu, 4);
switch(res){
case FORMAT_ALL_FAT32:
if (makewaitmenu("Are you sure you want to format your sd?\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10)){
if (format(1))
sd_mounted = false;
if (res >= 0){
if(makewaitmenu("Are you sure you want to format your sd?\nThis will delete everything on your SD card\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10)){
if (format(res)){
sd_unmount();
sd_mounted = false;
}
break;
case FORMAT_EMUMMC:
if (makewaitmenu("Are you sure you want to format your sd?\nThis action is irreversible!\n\nPress Vol+/- to cancel\n", "Press Power to continue", 10)){
if (format(0))
sd_mounted = false;
}
break;
}
}
break;
case CREDITS:

View file

@ -37,8 +37,8 @@ enum toolsmenu_return {
};
enum formatmenu_return {
FORMAT_ALL_FAT32,
FORMAT_EMUMMC
FORMAT_EMUMMC = 0,
FORMAT_ALL_FAT32
};
//menu_item mainmenu[MAINMENU_AMOUNT];