Prevent duplication of PSTRs to save memory (#15435)
This commit is contained in:
committed by
Scott Lahteine
parent
98f614ddb1
commit
e3ff27c95a
@@ -97,7 +97,7 @@ inline void sdcard_start_selected_file() {
|
||||
|
||||
class MenuItem_sdfile {
|
||||
public:
|
||||
static void action(CardReader &) {
|
||||
static void action(PGM_P const pstr, CardReader &) {
|
||||
#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
|
||||
// Save menu state for the selected file
|
||||
sd_encoder_position = ui.encoderPosition;
|
||||
@@ -105,7 +105,7 @@ class MenuItem_sdfile {
|
||||
sd_items = screen_items;
|
||||
#endif
|
||||
#if ENABLED(SD_MENU_CONFIRM_START)
|
||||
MenuItem_submenu::action(menu_sd_confirm);
|
||||
MenuItem_submenu::action(pstr, menu_sd_confirm);
|
||||
#else
|
||||
sdcard_start_selected_file();
|
||||
#endif
|
||||
@@ -114,7 +114,7 @@ class MenuItem_sdfile {
|
||||
|
||||
class MenuItem_sdfolder {
|
||||
public:
|
||||
static void action(CardReader &theCard) {
|
||||
static void action(PGM_P const, CardReader &theCard) {
|
||||
card.cd(theCard.filename);
|
||||
encoderTopLine = 0;
|
||||
ui.encoderPosition = 2 * (ENCODER_STEPS_PER_MENU_ITEM);
|
||||
|
Reference in New Issue
Block a user