From 4a197ec29a660ce66cb92a281cbd339e43bd77e1 Mon Sep 17 00:00:00 2001 From: Kjell Ericson Date: Fri, 10 Jan 2003 13:26:12 +0000 Subject: Function lcd_allow_bidirectictional_scrolling() implemented so we can turn it off. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3064 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-player.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'firmware/drivers/lcd-player.c') diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index c6385a222c..3917692df9 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c @@ -78,6 +78,7 @@ static char scroll_name[] = "scroll"; static char scroll_speed = 8; /* updates per second */ static int scroll_delay = HZ/2; /* delay before starting scroll */ static char scroll_spacing = 3; /* spaces between end and start of text */ +static bool allow_bidirectictional_scrolling = true; static struct scrollinfo scroll[SCROLLABLE_LINES]; @@ -462,8 +463,10 @@ void lcd_puts_scroll(int x, int y, unsigned char* string ) s->direction=+1; strncpy(s->text,string,sizeof s->text); s->turn_offset=-1; - if ( s->textlen + x > 11+4) - s->turn_offset=s->textlen-x-11+4; + if (allow_bidirectictional_scrolling) { + if ( s->textlen + x > 11+4) + s->turn_offset=s->textlen-x-11+4; + } for (i=0; itextlen<(int)sizeof(s->text); i++) { s->text[s->textlen++]=' '; @@ -554,6 +557,11 @@ void lcd_scroll_resume_line(int line) } } +void lcd_allow_bidirectictional_scrolling(bool on) +{ + allow_bidirectictional_scrolling=on; +} + void lcd_scroll_speed(int speed) { scroll_speed = speed; -- cgit v1.2.3