summaryrefslogtreecommitdiffstats
path: root/firmware/drivers/lcd-16bit-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-16bit-common.c')
-rw-r--r--firmware/drivers/lcd-16bit-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/lcd-16bit-common.c b/firmware/drivers/lcd-16bit-common.c
index 7c766dab8a..49e515f59f 100644
--- a/firmware/drivers/lcd-16bit-common.c
+++ b/firmware/drivers/lcd-16bit-common.c
@@ -81,11 +81,12 @@ void lcd_clear_viewport(void)
}
else
{
- if (!lcd_backdrop)
+ if (lcd_backdrop && lcd_current_viewport->buffer == &lcd_framebuffer_default)
{
do
{
- memset16(dst, lcd_current_viewport->bg_pattern, len);
+ memcpy(dst, PTR_ADD(dst, lcd_backdrop_offset),
+ len * sizeof(fb_data));
dst += step;
}
while (dst <= dst_end);
@@ -94,8 +95,7 @@ void lcd_clear_viewport(void)
{
do
{
- memcpy(dst, PTR_ADD(dst, lcd_backdrop_offset),
- len * sizeof(fb_data));
+ memset16(dst, lcd_current_viewport->bg_pattern, len);
dst += step;
}
while (dst <= dst_end);