diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b6418f0db2dc..ff6b673428b5 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1616,7 +1616,7 @@ // SD Card Sorting options #if ENABLED(SDCARD_SORT_ALPHA) #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. - #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_FOLDERS -1 // -1=above 0=none 1=below #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 G-code. #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 030674d00b07..e010aa448a2a 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -3404,8 +3404,8 @@ #define SDSORT_USES_RAM true #define SDSORT_USES_STACK false #define SDSORT_CACHE_NAMES true - #ifndef FOLDER_SORTING - #define FOLDER_SORTING -1 + #ifndef SDSORT_FOLDERS + #define SDSORT_FOLDERS -1 #endif #ifndef SDSORT_GCODE #define SDSORT_GCODE false diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index e6a905eba96e..ecc0a831ba59 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -157,7 +157,7 @@ CardReader::CardReader() { sort_count = 0; #if ENABLED(SDSORT_GCODE) sort_alpha = true; - sort_folders = FOLDER_SORTING; + sort_folders = SDSORT_FOLDERS; //sort_reverse = false; #endif #endif @@ -1210,7 +1210,7 @@ void CardReader::cdroot() { #if ENABLED(SDSORT_GCODE) sort_folders ? _SORT_CMP_DIR(sort_folders) : _SORT_CMP_NODIR() #else - _SORT_CMP_DIR(FOLDER_SORTING) + _SORT_CMP_DIR(SDSORT_FOLDERS) #endif #else _SORT_CMP_NODIR() diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index b3b887a069a6..3aa8a7e6ecdd 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -31,7 +31,10 @@ extern const char M23_STR[], M24_STR[]; #if ENABLED(SDSORT_DYNAMIC_RAM) #define SD_RESORT 1 #endif - #if FOLDER_SORTING || ENABLED(SDSORT_GCODE) + #ifndef SDSORT_FOLDERS + #define SDSORT_FOLDERS 0 + #endif + #if SDSORT_FOLDERS || ENABLED(SDSORT_GCODE) #define HAS_FOLDER_SORTING 1 #endif #endif