all repos — mgba @ c0a94967ca1295f747d69325787f33bc15f51e76

mGBA Game Boy Advance Emulator

GUI: Minor fixes
Vicki Pfau vi@endrift.com
Wed, 12 Sep 2018 19:27:53 -0700
commit

c0a94967ca1295f747d69325787f33bc15f51e76

parent

4f312a099848ccc657fdf0cb39efbf710895039e

1 files changed, 5 insertions(+), 0 deletions(-)

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

@@ -64,6 +64,7 @@ if (!(i % SCANNING_THRESHOLD_1)) {

uint32_t input = 0; GUIPollInput(params, &input, 0); if (input & (1 << GUI_INPUT_CANCEL)) { + dir->close(dir); return false; }

@@ -102,6 +103,7 @@ if (!(i % SCANNING_THRESHOLD_2)) {

uint32_t input = 0; GUIPollInput(params, &input, 0); if (input & (1 << GUI_INPUT_CANCEL)) { + dir->close(dir); return false; }

@@ -168,6 +170,9 @@ break;

} if (reason == GUI_MENU_EXIT_ACCEPT) { if (params->fileIndex == 0) { + if (strncmp(params->currentPath, params->basePath, PATH_MAX) == 0) { + continue; + } _upDirectory(params->currentPath); if (!_refreshDirectory(params, params->currentPath, &menu.items, filterName, filterContents)) { break;