From eb9ca72388ae2711adced9771a57b94d3a9caf7b Mon Sep 17 00:00:00 2001 From: Alexander Levin Date: Sun, 23 Jan 2011 21:57:23 +0000 Subject: Fix r29123: the variable should be initialized every time in the loop git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29124 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-bitmap-common.c | 3 ++- firmware/drivers/lcd-charcell.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'firmware/drivers') diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index 1a504c6f40..364fb3c527 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -435,7 +435,7 @@ void LCDFN(scroll_fn)(void) int index; int xpos, ypos; struct viewport* old_vp = current_vp; - bool makedelay = false; + bool makedelay; for ( index = 0; index < LCDFN(scroll_info).lines; index++ ) { s = &LCDFN(scroll_info).scroll[index]; @@ -455,6 +455,7 @@ void LCDFN(scroll_fn)(void) xpos = s->startx; ypos = s->y * pf->height + s->y_offset; + makedelay = false; if (s->bidir) { /* scroll bidirectional */ if (s->offset <= 0) { /* at beginning of line */ diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c index 6a40f6ba95..b59b270f9b 100644 --- a/firmware/drivers/lcd-charcell.c +++ b/firmware/drivers/lcd-charcell.c @@ -569,7 +569,7 @@ void lcd_scroll_fn(void) int xpos, ypos; bool update; struct viewport* old_vp = current_vp; - bool makedelay = false; + bool makedelay; update = false; for ( index = 0; index < lcd_scroll_info.lines; index++ ) { @@ -589,6 +589,7 @@ void lcd_scroll_fn(void) xpos = s->startx; ypos = s->y; + makedelay = false; if (s->bidir) /* scroll bidirectional */ { if (s->offset <= 0) { -- cgit v1.2.3