mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Added R+B shortcut for quick return to root
This commit is contained in:
parent
d7d6b18e3d
commit
83928cde9a
@ -686,6 +686,11 @@ u32 GodMode() {
|
|||||||
}
|
}
|
||||||
} else if (*current_path && ((pad_state & BUTTON_B) || // one level down
|
} else if (*current_path && ((pad_state & BUTTON_B) || // one level down
|
||||||
((pad_state & BUTTON_A) && (curr_entry->type == T_DOTDOT)))) {
|
((pad_state & BUTTON_A) && (curr_entry->type == T_DOTDOT)))) {
|
||||||
|
if (switched) { // use R+B to return to root fast
|
||||||
|
*current_path = '\0';
|
||||||
|
GetDirContents(current_dir, current_path);
|
||||||
|
cursor = scroll = 0;
|
||||||
|
} else {
|
||||||
char old_path[256];
|
char old_path[256];
|
||||||
char* last_slash = strrchr(current_path, '/');
|
char* last_slash = strrchr(current_path, '/');
|
||||||
strncpy(old_path, current_path, 256);
|
strncpy(old_path, current_path, 256);
|
||||||
@ -698,6 +703,7 @@ u32 GodMode() {
|
|||||||
if (*current_path && !cursor && (current_dir->n_entries > 1)) cursor = 1; // don't set it on the dotdot
|
if (*current_path && !cursor && (current_dir->n_entries > 1)) cursor = 1; // don't set it on the dotdot
|
||||||
scroll = 0;
|
scroll = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (switched && (pad_state & BUTTON_B)) { // unmount SD card
|
} else if (switched && (pad_state & BUTTON_B)) { // unmount SD card
|
||||||
DeinitExtFS();
|
DeinitExtFS();
|
||||||
if (GetMountState() != IMG_RAMDRV)
|
if (GetMountState() != IMG_RAMDRV)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user