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

FIX: Using OSD config when USE_OSD not defined. (#11963)

This commit is contained in:
J Blackman 2022-11-07 15:00:26 +11:00 committed by GitHub
commit 07175cd83a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}