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.tar.gz
rockbox-4d58b0d4f8b3acf971190b8e8be6568ee1ea8e35.zip
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 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,
287 int w, px; 287 int w, px;
288 fb_data *dst; 288 fb_data *dst;
289 289
290 if (x + width > LCD_WIDTH) 290 if (x + width > current_vp->width)
291 width = LCD_WIDTH - x; /* Clip right */ 291 width = current_vp->width - x; /* Clip right */
292 if (x < 0) 292 if (x < 0)
293 width += x, x = 0; /* Clip left */ 293 width += x, x = 0; /* Clip left */
294 if (width <= 0) 294 if (width <= 0)
295 return; /* nothing left to do */ 295 return; /* nothing left to do */
296 296
297 if (y + height > LCD_HEIGHT) 297 if (y + height > current_vp->height)
298 height = LCD_HEIGHT - y; /* Clip bottom */ 298 height = current_vp->height - y; /* Clip bottom */
299 if (y < 0) 299 if (y < 0)
300 height += y, y = 0; /* Clip top */ 300 height += y, y = 0; /* Clip top */
301 if (height <= 0) 301 if (height <= 0)
302 return; /* nothing left to do */ 302 return; /* nothing left to do */
303 303
304 src += stride * src_y + src_x; /* move starting point */ 304 src += stride * src_y + src_x; /* move starting point */
305 dst = &lcd_framebuffer[y][x]; 305 dst = &lcd_framebuffer[current_vp->y+y][current_vp->x+x];
306 306
307 asm volatile ( 307 asm volatile (
308 ".rowstart: \r\n" 308 ".rowstart: \r\n"