linuxOS_AP05/buildroot/package/rockchip/lvgl/0003-fix-bmp-24bpp-bug.patch

27 lines
1009 B
Diff
Raw Permalink Normal View History

2025-06-02 05:59:07 +00:00
From 591e95b9cecd663438701296fdb4284d6309d069 Mon Sep 17 00:00:00 2001
From: Jinkun Hong <jinkun.hong@rock-chips.com>
Date: Mon, 6 Jun 2022 09:46:22 +0800
Subject: [PATCH 3/6] fix bmp 24bpp bug
Signed-off-by: Jinkun Hong <jinkun.hong@rock-chips.com>
---
src/extra/libs/bmp/lv_bmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/extra/libs/bmp/lv_bmp.c b/src/extra/libs/bmp/lv_bmp.c
index 73e8030..633c5d9 100644
--- a/src/extra/libs/bmp/lv_bmp.c
+++ b/src/extra/libs/bmp/lv_bmp.c
@@ -152,7 +152,7 @@ static lv_res_t decoder_open(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t *
b.row_size_bytes = ((b.bpp * b.px_width + 31) / 32) * 4;
bool color_depth_error = false;
- if(LV_COLOR_DEPTH == 32 && (b.bpp != 32 || b.bpp != 24)) {
+ if(LV_COLOR_DEPTH == 32 && (!(b.bpp == 32 || b.bpp == 24))) {
LV_LOG_WARN("LV_COLOR_DEPTH == 32 but bpp is %d (should be 32 or 24)", b.bpp);
color_depth_error = true;
}
--
2.7.4