mirror of https://github.com/mgba-emu/mgba.git
GUI: Don't scan subdirectories immediately
This commit is contained in:
parent
1a50718c26
commit
8284e7ded2
|
@ -116,24 +116,10 @@ static bool _refreshDirectory(struct GUIParams* params, const char* currentPath,
|
||||||
}
|
}
|
||||||
struct VDir* vd = dir->openDir(dir, GUIMenuItemListGetPointer(currentFiles, item)->title);
|
struct VDir* vd = dir->openDir(dir, GUIMenuItemListGetPointer(currentFiles, item)->title);
|
||||||
if (vd) {
|
if (vd) {
|
||||||
bool success = false;
|
|
||||||
struct VDirEntry* de;
|
|
||||||
while ((de = vd->listNext(vd)) && !success) {
|
|
||||||
struct VFile* vf2 = vd->openFile(vd, de->name(de), O_RDONLY);
|
|
||||||
if (!vf2) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (filter(vf2)) {
|
|
||||||
success = true;
|
|
||||||
}
|
|
||||||
vf2->close(vf2);
|
|
||||||
}
|
|
||||||
vd->close(vd);
|
vd->close(vd);
|
||||||
if (success) {
|
|
||||||
++item;
|
++item;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
struct VFile* vf = dir->openFile(dir, GUIMenuItemListGetPointer(currentFiles, item)->title, O_RDONLY);
|
struct VFile* vf = dir->openFile(dir, GUIMenuItemListGetPointer(currentFiles, item)->title, O_RDONLY);
|
||||||
if (vf) {
|
if (vf) {
|
||||||
if (filter(vf)) {
|
if (filter(vf)) {
|
||||||
|
|
Loading…
Reference in New Issue