mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
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: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
parent
eed2974218
commit
28c9e34827
1 changed files with 13 additions and 2 deletions
|
@ -70,8 +70,19 @@ static void draw_logo(void)
|
|||
int x, y;
|
||||
ulong addr;
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue