From 4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Wed, 5 Mar 2008 08:12:54 +0000 Subject: Oops (from about 2 months ago) - implement viewport support in the Gigabeat F's asm-optimised lcd_bitmap_transparent_part() function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16525 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'firmware/target/arm') diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c index 1d5b431625..fc8822ba50 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c @@ -287,22 +287,22 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int w, px; fb_data *dst; - if (x + width > LCD_WIDTH) - width = LCD_WIDTH - x; /* Clip right */ + if (x + width > current_vp->width) + width = current_vp->width - x; /* Clip right */ if (x < 0) width += x, x = 0; /* Clip left */ if (width <= 0) return; /* nothing left to do */ - if (y + height > LCD_HEIGHT) - height = LCD_HEIGHT - y; /* Clip bottom */ + if (y + height > current_vp->height) + height = current_vp->height - y; /* Clip bottom */ if (y < 0) height += y, y = 0; /* Clip top */ if (height <= 0) return; /* nothing left to do */ src += stride * src_y + src_x; /* move starting point */ - dst = &lcd_framebuffer[y][x]; + dst = &lcd_framebuffer[current_vp->y+y][current_vp->x+x]; asm volatile ( ".rowstart: \r\n" -- cgit v1.2.3