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

@@ -924,7 +924,7 @@ void CardReader::cdroot() {
// Init sort order.
for (uint16_t i = 0; i < fileCnt; i++) {
sort_order[i] = TERN(SDCARD_RATHERRECENTFIRST, fileCnt - 1 - i, i);
sort_order[i] = SD_ORDER(i, fileCnt);
// If using RAM then read all filenames now.
#if ENABLED(SDSORT_USES_RAM)
selectFileByIndex(i);