mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
parent
67222429b4
commit
10da2e3789
@ -2261,8 +2261,8 @@ u32 GodMode(int entrypoint) {
|
||||
u32 n_opt = 0;
|
||||
int poweroff = ++n_opt;
|
||||
int reboot = ++n_opt;
|
||||
int scripts = (CheckSupportDir(SCRIPTS_DIR)) ? (int) ++n_opt : -1;
|
||||
int payloads = (CheckSupportDir(PAYLOADS_DIR)) ? (int) ++n_opt : -1;
|
||||
int scripts = ++n_opt;
|
||||
int payloads = ++n_opt;
|
||||
int more = ++n_opt;
|
||||
if (poweroff > 0) optionstr[poweroff - 1] = "Poweroff system";
|
||||
if (reboot > 0) optionstr[reboot - 1] = "Reboot system";
|
||||
@ -2275,13 +2275,19 @@ u32 GodMode(int entrypoint) {
|
||||
(user_select != poweroff) && (user_select != reboot)) {
|
||||
char loadpath[256];
|
||||
if ((user_select == more) && (HomeMoreMenu(current_path) == 0)) break; // more... menu
|
||||
else if ((user_select == scripts) && (FileSelectorSupport(loadpath, "HOME scripts... menu.\nSelect script:", SCRIPTS_DIR, "*.gm9"))) {
|
||||
ExecuteGM9Script(loadpath);
|
||||
GetDirContents(current_dir, current_path);
|
||||
ClearScreenF(true, true, COLOR_STD_BG);
|
||||
break;
|
||||
} else if ((user_select == payloads) && (FileSelectorSupport(loadpath, "HOME payloads... menu.\nSelect payload:", PAYLOADS_DIR, "*.firm"))) {
|
||||
BootFirmHandler(loadpath, false, false);
|
||||
else if (user_select == scripts) {
|
||||
if (!CheckSupportDir(SCRIPTS_DIR)) {
|
||||
ShowPrompt(false, "Scripts directory not found.\n(default path: 0:/gm9/" SCRIPTS_DIR ")");
|
||||
} else if (FileSelectorSupport(loadpath, "HOME scripts... menu.\nSelect script:", SCRIPTS_DIR, "*.gm9")) {
|
||||
ExecuteGM9Script(loadpath);
|
||||
GetDirContents(current_dir, current_path);
|
||||
ClearScreenF(true, true, COLOR_STD_BG);
|
||||
break;
|
||||
}
|
||||
} else if (user_select == payloads) {
|
||||
if (!CheckSupportDir(PAYLOADS_DIR)) ShowPrompt(false, "Payloads directory not found.\n(default path: 0:/gm9/" PAYLOADS_DIR ")");
|
||||
else if (FileSelectorSupport(loadpath, "HOME payloads... menu.\nSelect payload:", PAYLOADS_DIR, "*.firm"))
|
||||
BootFirmHandler(loadpath, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user