This commit is contained in:
RocketRobz 2020-02-03 19:27:21 -07:00
parent 3ae0e539cc
commit 6f99365a8e

View File

@ -553,6 +553,10 @@ string browseForFile (void) {
// Directory options // Directory options
if (entry->isDirectory && (held & KEY_R) && (pressed & KEY_A)) { if (entry->isDirectory && (held & KEY_R) && (pressed & KEY_A)) {
if (strcmp(entry->name.c_str(), "..") == 0) {
screenMode = 0;
return "null";
} else {
int getOp = fileBrowse_A(entry, path); int getOp = fileBrowse_A(entry, path);
if (getOp == 1 || getOp == 2) { if (getOp == 1 || getOp == 2) {
getDirectoryContents (dirContents); // Refresh directory listing getDirectoryContents (dirContents); // Refresh directory listing
@ -564,6 +568,7 @@ string browseForFile (void) {
for (int i = 0; i < 15; i++) swiWaitForVBlank(); for (int i = 0; i < 15; i++) swiWaitForVBlank();
} }
} }
}
if (pressed & KEY_B) { if (pressed & KEY_B) {
if ((strcmp (path, "sd:/") == 0) || (strcmp (path, "fat:/") == 0) || (strcmp (path, "nitro:/") == 0)) { if ((strcmp (path, "sd:/") == 0) || (strcmp (path, "fat:/") == 0) || (strcmp (path, "nitro:/") == 0)) {
@ -577,11 +582,6 @@ string browseForFile (void) {
fileOffset = 0; fileOffset = 0;
} }
if (strcmp(entry->name.c_str(), "..")==0 && (pressed & KEY_R) && (pressed & KEY_A)) {
screenMode = 0;
return "null";
}
// Rename file/folder // Rename file/folder
if ((held & KEY_R) && (pressed & KEY_X) && (strcmp (entry->name.c_str(), "..") != 0) && (strncmp (path, "nitro:/", 7) != 0)) { if ((held & KEY_R) && (pressed & KEY_X) && (strcmp (entry->name.c_str(), "..") != 0) && (strncmp (path, "nitro:/", 7) != 0)) {
pressed = 0; pressed = 0;