From ce19ce00b784036a06478acff7b6f830bd7837db Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 29 Jun 2005 01:54:21 +0000 Subject: Oops, that was no optimisation, but a bug. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6908 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-h100-remote.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'firmware/drivers/lcd-h100-remote.c') diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c index fe1c82dd3d..3edb27c155 100644 --- a/firmware/drivers/lcd-h100-remote.c +++ b/firmware/drivers/lcd-h100-remote.c @@ -421,14 +421,12 @@ void lcd_remote_update_rect(int x, int y, int width, int height) if(ymax >= LCD_REMOTE_HEIGHT/8) ymax = LCD_REMOTE_HEIGHT/8-1; - x += xoffset; - /* Copy specified rectange bitmap to hardware */ for (; y <= ymax; y++) - { + { lcd_remote_write_command(LCD_REMOTE_CNTL_SET_PAGE_ADDRESS | y); - lcd_remote_write_command(LCD_REMOTE_CNTL_HIGHCOL | ((x >> 4) & 0xf)); - lcd_remote_write_command(LCD_REMOTE_CNTL_LOWCOL | (x & 0xf)); + lcd_remote_write_command(LCD_REMOTE_CNTL_HIGHCOL | (((x+xoffset) >> 4) & 0xf)); + lcd_remote_write_command(LCD_REMOTE_CNTL_LOWCOL | ((x+xoffset) & 0xf)); lcd_remote_write_data(&lcd_remote_framebuffer[y][x], width); } } -- cgit v1.2.3