From 8bf80360212358591aa92af1591bddc7abaa47fb Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 16 Oct 2022 15:37:06 +0100 Subject: [PATCH] lcd: Fix clear_viewport on grayscale displays The original drawmode change was "x = (~x & INVERSEVID) | SOLID" which is essentially XOR'ing the INVERSEVID bit, but I changed it to mask out INVERSEVID by mistake. Fixes 44b9785465fc. Change-Id: I87b059b89aea9c31a8ff408016264285e67ca80c --- firmware/drivers/lcd-bitmap-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 4a94aff412..389d30917b 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -237,7 +237,7 @@ void LCDFN(clear_viewport)(void) else { oldmode = vp->drawmode; - vp->drawmode &= ~DRMODE_INVERSEVID; + vp->drawmode ^= DRMODE_INVERSEVID; vp->drawmode |= DRMODE_SOLID; LCDFN(fillrect)(0, 0, vp->width, vp->height);