all repos — mgba @ 8284e7ded2596317ff1700c71bdada0f504fb0d2

mGBA Game Boy Advance Emulator

GUI: Don't scan subdirectories immediately
Jeffrey Pfau jeffrey@endrift.com
Sat, 10 Oct 2015 20:50:23 -0700
commit

8284e7ded2596317ff1700c71bdada0f504fb0d2

parent

1a50718c26c6336b77cb119d0b1a4b399a6434e5

1 files changed, 2 insertions(+), 16 deletions(-)

jump to
M src/util/gui/file-select.csrc/util/gui/file-select.c

@@ -116,23 +116,9 @@ continue;

} struct VDir* vd = dir->openDir(dir, GUIMenuItemListGetPointer(currentFiles, item)->title); 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); - if (success) { - ++item; - continue; - } + ++item; + continue; } struct VFile* vf = dir->openFile(dir, GUIMenuItemListGetPointer(currentFiles, item)->title, O_RDONLY); if (vf) {