Skip to content

Commit 20ee8dd

Browse files
committed
♻️ FOLDER_SORTING => SDSORT_FOLDERS
1 parent 73ed511 commit 20ee8dd

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Marlin/Configuration_adv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@
16161616
// SD Card Sorting options
16171617
#if ENABLED(SDCARD_SORT_ALPHA)
16181618
#define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
1619-
#define FOLDER_SORTING -1 // -1=above 0=none 1=below
1619+
#define SDSORT_FOLDERS -1 // -1=above 0=none 1=below
16201620
#define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 G-code.
16211621
#define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
16221622
#define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)

Marlin/src/inc/Conditionals_post.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -3404,8 +3404,8 @@
34043404
#define SDSORT_USES_RAM true
34053405
#define SDSORT_USES_STACK false
34063406
#define SDSORT_CACHE_NAMES true
3407-
#ifndef FOLDER_SORTING
3408-
#define FOLDER_SORTING -1
3407+
#ifndef SDSORT_FOLDERS
3408+
#define SDSORT_FOLDERS -1
34093409
#endif
34103410
#ifndef SDSORT_GCODE
34113411
#define SDSORT_GCODE false

Marlin/src/sd/cardreader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ CardReader::CardReader() {
157157
sort_count = 0;
158158
#if ENABLED(SDSORT_GCODE)
159159
sort_alpha = true;
160-
sort_folders = FOLDER_SORTING;
160+
sort_folders = SDSORT_FOLDERS;
161161
//sort_reverse = false;
162162
#endif
163163
#endif
@@ -1210,7 +1210,7 @@ void CardReader::cdroot() {
12101210
#if ENABLED(SDSORT_GCODE)
12111211
sort_folders ? _SORT_CMP_DIR(sort_folders) : _SORT_CMP_NODIR()
12121212
#else
1213-
_SORT_CMP_DIR(FOLDER_SORTING)
1213+
_SORT_CMP_DIR(SDSORT_FOLDERS)
12141214
#endif
12151215
#else
12161216
_SORT_CMP_NODIR()

Marlin/src/sd/cardreader.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ extern const char M23_STR[], M24_STR[];
3131
#if ENABLED(SDSORT_DYNAMIC_RAM)
3232
#define SD_RESORT 1
3333
#endif
34-
#if FOLDER_SORTING || ENABLED(SDSORT_GCODE)
34+
#ifndef SDSORT_FOLDERS
35+
#define SDSORT_FOLDERS 0
36+
#endif
37+
#if SDSORT_FOLDERS || ENABLED(SDSORT_GCODE)
3538
#define HAS_FOLDER_SORTING 1
3639
#endif
3740
#endif

0 commit comments

Comments
 (0)