summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-03-05 08:12:54 +0000
committerDave Chapman <dave@dchapman.com>2008-03-05 08:12:54 +0000
commit4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35 (patch)
tree60e15602a4d161d314d37f297b03fa9f34baebb3
parent25949f9cd10583d2e8907860851b0fa3c7280a72 (diff)
downloadrockbox-4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35.zip
rockbox-4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35.tar.gz
rockbox-4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35.tar.bz2
rockbox-4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35.tar.xz
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
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c10
1 files changed, 5 insertions, 5 deletions
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 1d5b431..fc8822b 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"