mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
video: bmp: Fix video_splash_align_axis()
Convert panel_picture_delta and axis_alignment from unsigned long to long to insure to store correctly the difference between panel_size and picture_size in case the panel_size is smaller than picture_size. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> CC: Yannick Fertré <yannick.fertre@st.com> [agust: change axis_alignment to long] Signed-off-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
parent
28a4516cf1
commit
1ebf2855b4
1 changed files with 2 additions and 2 deletions
|
@ -157,8 +157,8 @@ __weak void fb_put_word(uchar **fb, uchar **from)
|
||||||
static void video_splash_align_axis(int *axis, unsigned long panel_size,
|
static void video_splash_align_axis(int *axis, unsigned long panel_size,
|
||||||
unsigned long picture_size)
|
unsigned long picture_size)
|
||||||
{
|
{
|
||||||
unsigned long panel_picture_delta = panel_size - picture_size;
|
long panel_picture_delta = panel_size - picture_size;
|
||||||
unsigned long axis_alignment;
|
long axis_alignment;
|
||||||
|
|
||||||
if (*axis == BMP_ALIGN_CENTER)
|
if (*axis == BMP_ALIGN_CENTER)
|
||||||
axis_alignment = panel_picture_delta / 2;
|
axis_alignment = panel_picture_delta / 2;
|
||||||
|
|
Loading…
Reference in a new issue