diff options
author | Kjell Ericson <kjell@haxx.se> | 2003-01-21 14:25:24 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2003-01-21 14:25:24 +0000 |
commit | d618fb0cb24761d3a5d4c42092398f60a895948c (patch) | |
tree | f932710d8cb4d17ad7f2c9c2f465da2f7440632d /firmware/drivers/lcd-player.c | |
parent | 4bea14d6bf07cbf498bca2fa5489f6c6c781a681 (diff) |
Added lcd_do_puts() as a static function and made lcd_puts() stop any scroll at that line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3140 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-player.c')
-rw-r--r-- | firmware/drivers/lcd-player.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index 17e3923715..29639fc64e 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c @@ -271,11 +271,11 @@ void lcd_clear_display(void) xlcd_update(); } -void lcd_puts(int x, int y, unsigned char *string) +static void lcd_do_puts(int x, int y, unsigned char *string) { bool update=false; -// lcd_write(true,LCD_CURSOR(x,y)); - DEBUGF("lcd_puts(%d, %d, \"", x, y); + DEBUGF("lcd_do_puts(%d, %d, \"", x, y); + for (; *string && x<11; x++) { #ifdef DEBUGF @@ -294,6 +294,12 @@ void lcd_puts(int x, int y, unsigned char *string) if (update) xlcd_update(); } +void lcd_puts(int x, int y, unsigned char *string) +{ + DEBUGF("lcd_puts(%d, %d)", x, y); + scroll[y].mode=SCROLL_MODE_OFF; + return lcd_do_puts(x, y, string); +} void lcd_putc(int x, int y, unsigned short ch) { @@ -302,7 +308,6 @@ void lcd_putc(int x, int y, unsigned short ch) if (x<0 || y<0) { return; } -// lcd_write(true,LCD_CURSOR(x,y)); update=lcdx_putc(x, y, ch); if (update) @@ -458,7 +463,7 @@ void lcd_puts_scroll(int x, int y, unsigned char* string ) s = &scroll[y]; - lcd_puts(x,y,string); + lcd_do_puts(x,y,string); s->textlen = strlen(string); if ( s->textlen > 11-x ) { @@ -495,7 +500,6 @@ void lcd_stop_scroll(void) s->mode == SCROLL_MODE_PAUSE ) { /* restore scrolled row */ lcd_puts(s->startx, s->starty, s->text); - s->mode = SCROLL_MODE_OFF; } } @@ -511,7 +515,6 @@ void lcd_stop_scroll_line(int line) s->mode == SCROLL_MODE_PAUSE ) { /* restore scrolled row */ lcd_puts(s->startx, s->starty, s->text); - s->mode = SCROLL_MODE_OFF; } lcd_update(); @@ -600,8 +603,6 @@ static void scroll_thread(void) if ( TIME_AFTER(current_tick, s->scroll_start_tick) ) { char buffer[12]; update = true; - DEBUGF("offset=%d, turn_offset=%d, len=%d", - s->offset, s->turn_offset, s->textlen); if ( s->offset < s->textlen-1 ) { s->offset+=s->direction; if (s->offset==0) { @@ -628,7 +629,7 @@ static void scroll_thread(void) buffer[i++]=s->text[o++]; } buffer[11]=0; - lcd_puts(s->startx, s->starty, buffer); + lcd_do_puts(s->startx, s->starty, buffer); } } |