1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Using OSD config when USE_OSD not defined.

- maybe worth setting up co-dependency between CMS and OSD (however can one exist without the other?)
This commit is contained in:
blckmn 2022-11-05 22:03:08 +11:00
parent 323936e7b2
commit 3a443d837f

View file

@ -897,9 +897,11 @@ void cmsMenuOpen(void)
menuStackIdx = 0;
setArmingDisabled(ARMING_DISABLED_CMS_MENU);
displayLayerSelect(pCurrentDisplay, DISPLAYPORT_LAYER_FOREGROUND); // make sure the foreground layer is active
#ifdef USE_OSD
if (osdConfig()->cms_background_type != DISPLAY_BACKGROUND_TRANSPARENT) {
displaySetBackgroundType(pCurrentDisplay, (displayPortBackground_e)osdConfig()->cms_background_type); // set the background type if not transparent
}
#endif
} else {
// Switch display
displayPort_t *pNextDisplay = cmsDisplayPortSelectNext();
@ -911,7 +913,9 @@ void cmsMenuOpen(void)
displaySetBackgroundType(pCurrentDisplay, DISPLAY_BACKGROUND_TRANSPARENT); // reset previous displayPort to transparent
displayRelease(pCurrentDisplay);
pCurrentDisplay = pNextDisplay;
#ifdef USE_OSD
displaySetBackgroundType(pCurrentDisplay, (displayPortBackground_e)osdConfig()->cms_background_type); // set the background type if not transparent
#endif
} else {
return;
}