diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-12-12 15:20:37 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-12-12 15:20:37 +0000 |
| commit | a2e98c1cd926efdbfd0fd9f43005068b7684efbe (patch) | |
| tree | 66185d3ff83eac6daa66fd9ba0cfe4f464fa19f8 /firmware/drivers/lcd-player.c | |
| parent | 2950f6c1e72cf7d600dc03b8cdec162aa5ba4676 (diff) | |
| download | rockbox-a2e98c1cd926efdbfd0fd9f43005068b7684efbe.zip rockbox-a2e98c1cd926efdbfd0fd9f43005068b7684efbe.tar.gz rockbox-a2e98c1cd926efdbfd0fd9f43005068b7684efbe.tar.bz2 rockbox-a2e98c1cd926efdbfd0fd9f43005068b7684efbe.tar.xz | |
Merged Uwe Freese's bidirectional scrolling patch. Added configurable scroll step size and scroll start delay.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2974 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-player.c')
| -rw-r--r-- | firmware/drivers/lcd-player.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index 0d0be69..fd5bf55 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c @@ -69,6 +69,7 @@ static void scroll_thread(void); static char scroll_stack[DEFAULT_STACK_SIZE]; static char scroll_name[] = "scroll"; static char scroll_speed = 8; /* updates per second */ +static char scroll_delay = HZ/2; /* delay before starting scroll */ static char scroll_spacing = 3; /* spaces between end and start of text */ static long scroll_start_tick; @@ -282,7 +283,7 @@ void lcd_puts_scroll(int x, int y, unsigned char* string ) struct scrollinfo* s; int index; - scroll_start_tick = current_tick + HZ/2; + scroll_start_tick = current_tick + scroll_delay; /* search for the next free entry */ for (index = 0; index < SCROLLABLE_LINES; index++) { @@ -381,7 +382,7 @@ void lcd_scroll_resume(void) struct scrollinfo* s; int index; - scroll_start_tick = current_tick + HZ/2; + scroll_start_tick = current_tick + scroll_delay; for ( index = 0; index < SCROLLABLE_LINES; index++ ) { s = &scroll[index]; @@ -396,7 +397,7 @@ void lcd_scroll_resume_line(int line) struct scrollinfo* s; int index; - scroll_start_tick = current_tick + HZ/2; + scroll_start_tick = current_tick + scroll_delay; for ( index = 0; index < SCROLLABLE_LINES; index++ ) { s = &scroll[index]; @@ -412,6 +413,10 @@ void lcd_scroll_speed(int speed) scroll_speed = speed; } +void lcd_scroll_delay(int ms) +{ + scroll_delay = ms / (HZ / 10); +} static void scroll_thread(void) { struct scrollinfo* s; |