From ad59ae736e609df0716371cf5bf6e19153845418 Mon Sep 17 00:00:00 2001 From: balika011 Date: Sat, 25 Aug 2018 20:12:01 +0200 Subject: [PATCH] Restore gfx_set_rect_grey This function only used when we use the built-in bootlogo. We need the same function in landscape mode too. --- bootloader/gfx/gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootloader/gfx/gfx.c b/bootloader/gfx/gfx.c index 0656a27..8ef876e 100644 --- a/bootloader/gfx/gfx.c +++ b/bootloader/gfx/gfx.c @@ -481,7 +481,7 @@ void gfx_set_rect_grey(gfx_ctxt_t *ctxt, const u8 *buf, u32 size_x, u32 size_y, { for (u32 x = pos_x; x < (pos_x + size_x); x++) { - gfx_set_pixel(ctxt, x, y, buf[pos] << 24 | buf[pos] << 16 | buf[pos] << 8 | buf[pos]); + memset(&ctxt->fb[x + y*ctxt->stride], buf[pos], 4); pos++; } }