From 3c0e112b8d088fb24de5b1cacc13959ab4a21e81 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 21 May 2023 08:41:01 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20TFT=20LVGL=20compile=20err?= =?UTF-8?q?or=20(#25865)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes regression from #24302 --- Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index 7949f729a5d9..9a8996330365 100644 --- a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -137,7 +137,10 @@ void tft_lvgl_init() { uint16_t usb_flash_loop = 1000; #if ENABLED(MULTI_VOLUME) && !HAS_SD_HOST_DRIVE SET_INPUT_PULLUP(SD_DETECT_PIN); - card.changeMedia(IS_SD_INSERTED() ? &card.media_driver_sdcard : &card.media_driver_usbFlash); + if (IS_SD_INSERTED()) + card.changeMedia(&card.media_driver_sdcard); + else + card.changeMedia(&card.media_driver_usbFlash); #endif do { card.media_driver_usbFlash.idle();