提交 dad631cc 编写于 作者: N Nikita Kiryanov 提交者: Anatolij Gustschin

lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDs

Commit fb6a9aab (LCD: display 32bpp decompressed bitmap image)
broke the check that allowed U-Boot to display 8 bpp BMPs on a 16
bpp LCD screen, effectively turning this feature off.

Restore this feature by changing the check back to the same meaning
it originally had.
To avoid future confusion, the check has also been rephrased to make
its meaning clear.
Signed-off-by: NNikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: NIgor Grinberg <grinberg@compulab.co.il>
上级 fd70aa41
......@@ -888,7 +888,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
}
/* We support displaying 8bpp BMPs on 16bpp LCDs */
if (bpix != bmp_bpix && (bmp_bpix != 8 || bpix != 16 || bpix != 32)) {
if (bpix != bmp_bpix && !(bmp_bpix == 8 && bpix == 16)) {
printf ("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n",
bpix,
le16_to_cpu(bmp->header.bit_count));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册