提交 28c9e348 编写于 作者: P Piotr Wilczek 提交者: Minkyu Kang

drivers: video: fix image position

This patch fixes image position on screen when images's height or width is biger then the lcd's.
Signed-off-by: NPiotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: NMinkyu Kang <mk7.kang@samsung.com>
上级 eed29742
......@@ -70,8 +70,19 @@ static void draw_logo(void)
int x, y;
ulong addr;
x = ((panel_width - panel_info.logo_width) >> 1);
y = ((panel_height - panel_info.logo_height) >> 1) - 4;
if (panel_width >= panel_info.logo_width) {
x = ((panel_width - panel_info.logo_width) >> 1);
} else {
x = 0;
printf("Warning: image width is bigger than display width\n");
}
if (panel_height >= panel_info.logo_height) {
y = ((panel_height - panel_info.logo_height) >> 1) - 4;
} else {
y = 0;
printf("Warning: image height is bigger than display height\n");
}
addr = panel_info.logo_addr;
bmp_display(addr, x, y);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册