Optimize Media Menu display/scrolling (#15233)
This commit is contained in:
parent
f1162243f6
commit
1ab3521351
|
@ -125,11 +125,19 @@ class MenuItem_sdfolder {
|
||||||
void menu_media() {
|
void menu_media() {
|
||||||
ui.encoder_direction_menus();
|
ui.encoder_direction_menus();
|
||||||
|
|
||||||
|
#if HAS_GRAPHICAL_LCD
|
||||||
|
static uint16_t fileCnt;
|
||||||
|
if (ui.first_page) {
|
||||||
|
fileCnt = card.get_num_Files();
|
||||||
|
card.getWorkDirName();
|
||||||
|
}
|
||||||
|
#else
|
||||||
const uint16_t fileCnt = card.get_num_Files();
|
const uint16_t fileCnt = card.get_num_Files();
|
||||||
|
card.getWorkDirName();
|
||||||
|
#endif
|
||||||
|
|
||||||
START_MENU();
|
START_MENU();
|
||||||
MENU_BACK(MSG_MAIN);
|
MENU_BACK(MSG_MAIN);
|
||||||
card.getWorkDirName();
|
|
||||||
if (card.filename[0] == '/') {
|
if (card.filename[0] == '/') {
|
||||||
#if !PIN_EXISTS(SD_DETECT)
|
#if !PIN_EXISTS(SD_DETECT)
|
||||||
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
|
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
|
||||||
|
|
Loading…
Reference in a new issue