Skip to content
Snippets Groups Projects
Commit d9015f6a authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Wolfgang Denk
Browse files

video: fix bug in logo_plot


If logo_plot() should ever be called with x starting
position other than zero and for pixel depths greater
than 8bpp, logo colors distortion will be observed.
This patch fixes the issue.

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 406819ae
No related branches found
No related tags found
No related merge requests found
...@@ -1071,7 +1071,9 @@ void logo_plot (void *screen, int width, int x, int y) ...@@ -1071,7 +1071,9 @@ void logo_plot (void *screen, int width, int x, int y)
int ycount = VIDEO_LOGO_HEIGHT; int ycount = VIDEO_LOGO_HEIGHT;
unsigned char r, g, b, *logo_red, *logo_blue, *logo_green; unsigned char r, g, b, *logo_red, *logo_blue, *logo_green;
unsigned char *source; unsigned char *source;
unsigned char *dest = (unsigned char *)screen + ((y * width * VIDEO_PIXEL_SIZE) + x); unsigned char *dest = (unsigned char *)screen +
((y * width * VIDEO_PIXEL_SIZE) +
x * VIDEO_PIXEL_SIZE);
#ifdef CONFIG_VIDEO_BMP_LOGO #ifdef CONFIG_VIDEO_BMP_LOGO
source = bmp_logo_bitmap; source = bmp_logo_bitmap;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment