mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Add SD format menu on HOME button menu
This commit is contained in:
parent
e0e014ec16
commit
b4d3b6f3c3
@ -928,14 +928,32 @@ u32 GodMode() {
|
|||||||
exit_mode = GODMODE_EXIT_POWEROFF;
|
exit_mode = GODMODE_EXIT_POWEROFF;
|
||||||
break;
|
break;
|
||||||
} else if (pad_state & BUTTON_HOME) { // Home menu
|
} else if (pad_state & BUTTON_HOME) { // Home menu
|
||||||
const char* optionstr[2] = { "Poweroff system", "Reboot system" };
|
const char* optionstr[3] = { "Poweroff system", "Reboot system", "SD format menu" };
|
||||||
u32 user_select = ShowSelectPrompt(2, optionstr, "HOME button pressed.\nSelect action:" );
|
u32 user_select = ShowSelectPrompt(3, optionstr, "HOME button pressed.\nSelect action:" );
|
||||||
if (user_select == 1) {
|
if (user_select == 1) {
|
||||||
exit_mode = GODMODE_EXIT_POWEROFF;
|
exit_mode = GODMODE_EXIT_POWEROFF;
|
||||||
break;
|
break;
|
||||||
} else if (user_select == 2) {
|
} else if (user_select == 2) {
|
||||||
exit_mode = GODMODE_EXIT_REBOOT;
|
exit_mode = GODMODE_EXIT_REBOOT;
|
||||||
break;
|
break;
|
||||||
|
} else if (user_select == 3) {
|
||||||
|
DeinitExtFS();
|
||||||
|
if (GetMountState() != IMG_RAMDRV)
|
||||||
|
MountImage(NULL);
|
||||||
|
DeinitSDCardFS();
|
||||||
|
clipboard->n_entries = 0;
|
||||||
|
memset(panedata, 0x00, N_PANES * sizeof(PaneData));
|
||||||
|
if (ShowPrompt(true, "SD card unmounted, enter format menu?"))
|
||||||
|
SdFormatMenu();
|
||||||
|
while (!InitSDCardFS()) {
|
||||||
|
if (!ShowPrompt(true, "Reinitialising SD card failed! Retry?"))
|
||||||
|
return exit_mode;
|
||||||
|
}
|
||||||
|
ClearScreenF(true, false, COLOR_STD_BG);
|
||||||
|
InitEmuNandBase();
|
||||||
|
InitExtFS();
|
||||||
|
GetDirContents(current_dir, current_path);
|
||||||
|
if (cursor >= current_dir->n_entries) cursor = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user