summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-fuze
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-24 16:01:53 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-24 16:01:53 +0000
commite4921d6ab5f7bf8999592faa0a9179bb40f11ebf (patch)
tree247d2780bdf1b78a482d22002a46f4dd9b8e1565 /firmware/target/arm/as3525/sansa-fuze
parentc6a29640680fe3eef34754ff41a7a3ed6e3803b2 (diff)
Speed up lcd_update_rect by ~2.5% by counting towards 0 in the loop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23329 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuze')
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
index 21ecdf8afa..c22382f19c 100644
--- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
+++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
@@ -405,12 +405,13 @@ void lcd_update_rect(int x, int y, int width, int height)
ptr = &lcd_framebuffer[y][x];
+ height = ymax - y - 1; /* fix height */
do
{
lcd_write_data(ptr, width);
ptr += LCD_WIDTH;
}
- while (++y <= ymax);
+ while (--height > 0);
lcd_busy = false;
}