diff --git a/source/arm11/filebrowser.c b/source/arm11/filebrowser.c index 73cedf8..dd0ec3d 100644 --- a/source/arm11/filebrowser.c +++ b/source/arm11/filebrowser.c @@ -156,7 +156,7 @@ Result browseFiles(const char *const basePath, char selected[512]) s32 oldCursorPos = 0; while(1) { - ee_printf(*dList->ptrs[cursorPos] == ENT_TYPE_FILE ? "\x1b[%lu;H\x1b[37m %.51s" : "\x1b[%lu;H\x1b[36m %.51s", oldCursorPos - windowPos, &dList->ptrs[oldCursorPos][1]); // Clear old cursor. + ee_printf(*dList->ptrs[oldCursorPos] == ENT_TYPE_FILE ? "\x1b[%lu;H\x1b[37m %.51s" : "\x1b[%lu;H\x1b[36m %.51s", oldCursorPos - windowPos, &dList->ptrs[oldCursorPos][1]); // Clear old cursor. ee_printf("\x1b[%lu;H\x1b[33m>%.51s", cursorPos - windowPos, &dList->ptrs[cursorPos][1]); // Draw cursor. u32 kDown; @@ -226,8 +226,7 @@ Result browseFiles(const char *const basePath, char selected[512]) } if((res = scanDir(curDir, dList, ".gba")) != RES_OK) break; - cursorPos = 0; - windowPos = 0; + cursorPos = oldCursorPos = windowPos = 0; showDirList(dList, 0); } }