From 73b26168cdd7fec45d35e23f10abe3985525314b Mon Sep 17 00:00:00 2001 From: Steve Evans Date: Fri, 13 Sep 2024 21:20:18 +0100 Subject: [PATCH] OSD background rendering (#13897) * Ensure display severity attribute is set to defaults for background items * MAX7456 doesn't have a background layer --- src/main/drivers/max7456.c | 2 +- src/main/osd/osd_elements.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/drivers/max7456.c b/src/main/drivers/max7456.c index 95b004d57f..ea528c49eb 100644 --- a/src/main/drivers/max7456.c +++ b/src/main/drivers/max7456.c @@ -512,7 +512,7 @@ void max7456Write(uint8_t x, uint8_t y, const char *text) bool max7456LayerSupported(displayPortLayer_e layer) { - if (layer == DISPLAYPORT_LAYER_FOREGROUND || layer == DISPLAYPORT_LAYER_BACKGROUND) { + if (layer == DISPLAYPORT_LAYER_FOREGROUND) { return true; } else { return false; diff --git a/src/main/osd/osd_elements.c b/src/main/osd/osd_elements.c index c06a084057..b6854decea 100644 --- a/src/main/osd/osd_elements.c +++ b/src/main/osd/osd_elements.c @@ -2151,8 +2151,9 @@ static bool osdDrawSingleElementBackground(displayPort_t *osdDisplayPort, uint8_ activeElement.type = OSD_TYPE(osdElementConfig()->item_pos[item]); activeElement.buff = elementBuff; activeElement.osdDisplayPort = osdDisplayPort; - activeElement.rendered = true; activeElement.drawElement = true; + activeElement.rendered = true; + activeElement.attr = DISPLAYPORT_SEVERITY_NORMAL; // Call the element background drawing function osdElementBackgroundFunction[item](&activeElement);