mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Improve image mount path selection
This commit is contained in:
parent
67923556da
commit
a9c9d7a93f
@ -752,11 +752,17 @@ u32 GodMode() {
|
|||||||
ShowPrompt(false, "Mounting image: failed");
|
ShowPrompt(false, "Mounting image: failed");
|
||||||
InitImgFS(NULL);
|
InitImgFS(NULL);
|
||||||
} else {
|
} else {
|
||||||
|
cursor = 0;
|
||||||
*current_path = '\0';
|
*current_path = '\0';
|
||||||
GetDirContents(current_dir, current_path);
|
GetDirContents(current_dir, current_path);
|
||||||
cursor = 0;
|
for (u32 i = 0; i < current_dir->n_entries; i++) {
|
||||||
for (u32 i = current_dir->n_entries - 1; i > 0; i--)
|
if (strspn(current_dir->entry[i].path, "789GI") == 0)
|
||||||
if (strspn(current_dir->entry[i].path, "789GI") > 0) cursor = i;
|
continue;
|
||||||
|
strncpy(current_path, current_dir->entry[i].path, 256);
|
||||||
|
GetDirContents(current_dir, current_path);
|
||||||
|
cursor = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (user_select == searchdrv) { // -> search drive, open containing path
|
} else if (user_select == searchdrv) { // -> search drive, open containing path
|
||||||
char* last_slash = strrchr(curr_entry->path, '/');
|
char* last_slash = strrchr(curr_entry->path, '/');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user