mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Bug fix
This commit is contained in:
parent
2edfa7faab
commit
93cfb60710
@ -32,7 +32,7 @@ bool flashcardFound(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bothSDandFlashcard(void) {
|
bool bothSDandFlashcard(void) {
|
||||||
if ((access("sd:/", F_OK) == 0) && (access("fat:/", F_OK) == 0)) {
|
if (sdMounted && flashcardMounted) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -152,15 +152,13 @@ void showDirectoryContents (const vector<DirEntry>& dirContents, int startRow) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int fileBrowse_A(DirEntry* entry) {
|
int fileBrowse_A(DirEntry* entry, char path[PATH_MAX]) {
|
||||||
int pressed = 0;
|
int pressed = 0;
|
||||||
int assignedOp[3] = {0};
|
int assignedOp[3] = {0};
|
||||||
int optionOffset = 0;
|
int optionOffset = 0;
|
||||||
int cursorScreenPos = 0;
|
int cursorScreenPos = 0;
|
||||||
int maxCursors = -1;
|
int maxCursors = -1;
|
||||||
|
|
||||||
char path[PATH_MAX];
|
|
||||||
getcwd(path, PATH_MAX);
|
|
||||||
printf ("\x1b[0;27H");
|
printf ("\x1b[0;27H");
|
||||||
printf (" "); // Clear time
|
printf (" "); // Clear time
|
||||||
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
|
consoleInit(NULL, 1, BgType_Text4bpp, BgSize_T_256x256, 15, 0, false, true);
|
||||||
@ -426,12 +424,18 @@ string browseForFile (void) {
|
|||||||
screenOffset = 0;
|
screenOffset = 0;
|
||||||
fileOffset = 0;
|
fileOffset = 0;
|
||||||
} else {
|
} else {
|
||||||
int getOp = fileBrowse_A(entry);
|
char path[PATH_MAX];
|
||||||
if (getOp == 0) {
|
getcwd(path, PATH_MAX);
|
||||||
// Return the chosen file
|
if (bothSDandFlashcard() || entry->isApp
|
||||||
return entry->name;
|
|| strcmp (path, (secondaryDrive ? "fat:/gm9i/out/" : "sd:/gm9i/out/")) != 0)
|
||||||
} else if (getOp == 1 || getOp == 2) {
|
{
|
||||||
getDirectoryContents (dirContents); // Refresh directory listing
|
int getOp = fileBrowse_A(entry, path);
|
||||||
|
if (getOp == 0) {
|
||||||
|
// Return the chosen file
|
||||||
|
return entry->name;
|
||||||
|
} else if (getOp == 1 || getOp == 2) {
|
||||||
|
getDirectoryContents (dirContents); // Refresh directory listing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user