summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-ipod.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-ipod.c')
-rw-r--r--firmware/drivers/lcd-ipod.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/firmware/drivers/lcd-ipod.c b/firmware/drivers/lcd-ipod.c
index 7f881c529d..9be61f3134 100644
--- a/firmware/drivers/lcd-ipod.c
+++ b/firmware/drivers/lcd-ipod.c
@@ -418,31 +418,10 @@ void lcd_yuv_blit(unsigned char * const src[3],
418 int src_x, int src_y, int stride, 418 int src_x, int src_y, int stride,
419 int x, int y, int width, int height) 419 int x, int y, int width, int height)
420{ 420{
421 int y0, x0, y1, x1;
422 int h; 421 int h;
422 int y0, x0, y1, x1;
423 423
424 /* nothing to draw? */ 424 width = (width + 1) & ~1;
425 if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
426 || (x + width <= 0) || (y + height <= 0))
427 return;
428
429 /* clipping */
430 if (x < 0)
431 {
432 width += x;
433 src_x -= x;
434 x = 0;
435 }
436 if (y < 0)
437 {
438 height += y;
439 src_y -= y;
440 y = 0;
441 }
442 if (x + width > LCD_WIDTH)
443 width = LCD_WIDTH - x;
444 if (y + height > LCD_HEIGHT)
445 height = LCD_HEIGHT - y;
446 425
447 /* calculate the drawing region */ 426 /* calculate the drawing region */
448#if CONFIG_LCD == LCD_IPODNANO 427#if CONFIG_LCD == LCD_IPODNANO