diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 7e5528b9d..a663a759a 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -596,7 +596,7 @@ int32_t Screen::runOnce() if (displayHeight == 0) { displayHeight = dispdev->getHeight(); } - menuHandler::handleMenuSwitch(); + menuHandler::handleMenuSwitch(dispdev); // Show boot screen for first logo_timeout seconds, then switch to normal operation. // serialSinceMsec adjusts for additional serial wait time during nRF52 bootup @@ -1262,7 +1262,7 @@ int Screen::handleInputEvent(const InputEvent *event) setFastFramerate(); // Draw ASAP ui->update(); - menuHandler::handleMenuSwitch(); + menuHandler::handleMenuSwitch(dispdev); return 0; } /* diff --git a/src/graphics/draw/MenuHandler.cpp b/src/graphics/draw/MenuHandler.cpp index 29c27efde..b7dd316cb 100644 --- a/src/graphics/draw/MenuHandler.cpp +++ b/src/graphics/draw/MenuHandler.cpp @@ -571,7 +571,7 @@ void menuHandler::switchToMUIMenu() screen->showOverlayBanner(bannerOptions); } -void menuHandler::TFTColorPickerMenu() +void menuHandler::TFTColorPickerMenu(OLEDDisplay *display) { static const char *optionsArray[] = {"Back", "Default", "Meshtastic Green", "Yellow", "Red", "Orange", "Purple", "Teal", "Pink", "White"}; @@ -674,7 +674,7 @@ void menuHandler::removeFavoriteMenu() screen->showOverlayBanner(bannerOptions); } -void menuHandler::handleMenuSwitch() +void menuHandler::handleMenuSwitch(OLEDDisplay *display) { switch (menuQueue) { case menu_none: @@ -713,7 +713,7 @@ void menuHandler::handleMenuSwitch() switchToMUIMenu(); break; case tftcolormenupicker: - TFTColorPickerMenu(); + TFTColorPickerMenu(display); break; case reboot_menu: rebootMenu(); diff --git a/src/graphics/draw/MenuHandler.h b/src/graphics/draw/MenuHandler.h index 5e217b45c..22afa5ef0 100644 --- a/src/graphics/draw/MenuHandler.h +++ b/src/graphics/draw/MenuHandler.h @@ -26,7 +26,7 @@ class menuHandler static screenMenus menuQueue; static void LoraRegionPicker(uint32_t duration = 30000); - static void handleMenuSwitch(); + static void handleMenuSwitch(OLEDDisplay *display); static void clockMenu(); static void TZPicker(); static void TwelveHourPicker(); @@ -40,7 +40,7 @@ class menuHandler static void GPSToggleMenu(); static void BuzzerModeMenu(); static void switchToMUIMenu(); - static void TFTColorPickerMenu(); + static void TFTColorPickerMenu(OLEDDisplay *display); static void nodeListMenu(); static void resetNodeDBMenu(); static void rebootMenu();