Use R+B for SD unmount instead of just B

This commit is contained in:
d0k3 2016-03-17 19:41:27 +01:00
parent 8dc8d8e67d
commit 0163a5fd49

View File

@ -81,9 +81,9 @@ void DrawUserInterface(const char* curr_path, DirEntry* curr_entry, DirStruct* c
"GodMode9 Explorer v", VERSION, // generic start part "GodMode9 Explorer v", VERSION, // generic start part
(*curr_path) ? ((clipboard->n_entries == 0) ? "L - MARK files (use with \x18\x19\x1A\x1B)\nX - DELETE / [+R] RENAME file(s)\nY - COPY file(s) / [+R] CREATE dir\n" : (*curr_path) ? ((clipboard->n_entries == 0) ? "L - MARK files (use with \x18\x19\x1A\x1B)\nX - DELETE / [+R] RENAME file(s)\nY - COPY file(s) / [+R] CREATE dir\n" :
"L - MARK files (use with \x18\x19\x1A\x1B)\nX - DELETE / [+R] RENAME file(s)\nY - PASTE file(s) / [+R] CREATE dir\n") : "L - MARK files (use with \x18\x19\x1A\x1B)\nX - DELETE / [+R] RENAME file(s)\nY - PASTE file(s) / [+R] CREATE dir\n") :
((GetWritePermissions() <= 1) ? "X - Unlock EmuNAND writing\nY - Unlock SysNAND writing\nB - Unmount SD card\n" : ((GetWritePermissions() <= 1) ? "X - Unlock EmuNAND writing\nY - Unlock SysNAND writing\nR+B - Unmount SD card\n" :
(GetWritePermissions() == 2) ? "X - Relock EmuNAND writing\nY - Unlock SysNAND writing\nB - Unmount SD card\n" : (GetWritePermissions() == 2) ? "X - Relock EmuNAND writing\nY - Unlock SysNAND writing\nR+B - Unmount SD card\n" :
"X - Relock EmuNAND writing\nY - Relock SysNAND writing\nB - Unmount SD card\n"), "X - Relock EmuNAND writing\nY - Relock SysNAND writing\nR+B - Unmount SD card\n"),
"R+L - Make a Screenshot\n", "R+L - Make a Screenshot\n",
(clipboard->n_entries) ? "SELECT - Clear Clipboard\n" : "SELECT - Restore Clipboard\n", // only if clipboard is full (clipboard->n_entries) ? "SELECT - Clear Clipboard\n" : "SELECT - Restore Clipboard\n", // only if clipboard is full
"START - Reboot / [+\x1B] Poweroff"); // generic end part "START - Reboot / [+\x1B] Poweroff"); // generic end part
@ -187,7 +187,7 @@ u32 GodMode() {
(cursor > 1) && (strncmp(current_dir->entry[cursor].path, old_path, 256) != 0); cursor--); (cursor > 1) && (strncmp(current_dir->entry[cursor].path, old_path, 256) != 0); cursor--);
scroll = 0; scroll = 0;
} }
} else if (pad_state & BUTTON_B) { // unmount SD card } else if ((pad_state & BUTTON_B) && (pad_state & BUTTON_R1)) { // unmount SD card
DeinitFS(); DeinitFS();
ShowPrompt(false, "SD card unmounted, you can eject now.\nPut it back in before you press <A>."); ShowPrompt(false, "SD card unmounted, you can eject now.\nPut it back in before you press <A>.");
while (!InitSDCardFS()) { while (!InitSDCardFS()) {
@ -197,7 +197,7 @@ u32 GodMode() {
InitEmuNandBase(); InitEmuNandBase();
InitNandFS(); InitNandFS();
GetDirContents(current_dir, current_path); GetDirContents(current_dir, current_path);
cursor = 0; if (cursor >= current_dir->n_entries) cursor = 0;
} else if ((pad_state & BUTTON_DOWN) && (cursor + 1 < current_dir->n_entries)) { // cursor up } else if ((pad_state & BUTTON_DOWN) && (cursor + 1 < current_dir->n_entries)) { // cursor up
cursor++; cursor++;
} else if ((pad_state & BUTTON_UP) && cursor) { // cursor down } else if ((pad_state & BUTTON_UP) && cursor) { // cursor down