summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c')
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index 7c3ccc2c0b..24fc4eae57 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -556,12 +556,15 @@ void lcd_update_rect(int x, int y, int width, int height)
556 556
557 ptr = (fb_data*)&lcd_framebuffer[y][x]; 557 ptr = (fb_data*)&lcd_framebuffer[y][x];
558 558
559
560 height = ymax - y - 1; /* fix height */
561
559 do 562 do
560 { 563 {
561 lcd_write_data(ptr, width); 564 lcd_write_data(ptr, width);
562 ptr += LCD_WIDTH; 565 ptr += LCD_WIDTH;
563 } 566 }
564 while (++y <= ymax); 567 while (--height > 0);
565 568
566 lcd_busy = false; 569 lcd_busy = false;
567} /* lcd_update_rect */ 570} /* lcd_update_rect */