Do SD sort order in CardReader

This commit is contained in:
Scott Lahteine
2020-04-25 18:39:47 -05:00
parent fc98383659
commit 967c1d8534
4 changed files with 5 additions and 16 deletions

View File

@ -1039,13 +1039,7 @@ namespace ExtUI {
bool FileList::seek(const uint16_t pos, const bool skip_range_check) {
#if ENABLED(SDSUPPORT)
if (!skip_range_check && (pos + 1) > count()) return false;
const uint16_t nr =
#if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA)
count() - 1 -
#endif
pos;
card.getfilename_sorted(nr);
card.getfilename_sorted(SD_ORDER(pos, count()));
return card.filename[0] != '\0';
#else
UNUSED(pos);