Followup to SD menu optimization (#15252)
This commit is contained in:
committed by
Scott Lahteine
parent
61e3f119f4
commit
15bea5043c
@ -127,18 +127,21 @@ void menu_media() {
|
||||
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
static uint16_t fileCnt;
|
||||
static bool at_root;
|
||||
if (ui.first_page) {
|
||||
fileCnt = card.get_num_Files();
|
||||
card.getWorkDirName();
|
||||
at_root = card.filename[0] == '/';
|
||||
}
|
||||
#else
|
||||
const uint16_t fileCnt = card.get_num_Files();
|
||||
card.getWorkDirName();
|
||||
const bool at_root = card.filename[0] == '/';
|
||||
#endif
|
||||
|
||||
START_MENU();
|
||||
MENU_BACK(MSG_MAIN);
|
||||
if (card.filename[0] == '/') {
|
||||
if (at_root) {
|
||||
#if !PIN_EXISTS(SD_DETECT)
|
||||
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user