summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
authorMats Lidell <matsl@rockbox.org>2002-10-17 15:15:04 +0000
committerMats Lidell <matsl@rockbox.org>2002-10-17 15:15:04 +0000
commitc4a09adf2998524734abcc8635768fbc82dff90c (patch)
treef1562f3b70a7395d56910171b58f902739eea553 /uisimulator
parentfcf08a1ce63a551174ce600e2c80cfdf2fe0f891 (diff)
downloadrockbox-c4a09adf2998524734abcc8635768fbc82dff90c.tar.gz
rockbox-c4a09adf2998524734abcc8635768fbc82dff90c.zip
Scroll works for wps and menus. Still much cleanup to do.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2704 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/lcd-playersim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c
index c30753e02f..9ce20b3ec3 100644
--- a/uisimulator/common/lcd-playersim.c
+++ b/uisimulator/common/lcd-playersim.c
@@ -161,7 +161,7 @@ void lcd_puts(int x, int y, unsigned char *str)
161#if defined(HAVE_LCD_CHARCELLS) 161#if defined(HAVE_LCD_CHARCELLS)
162 /* We make the simulator truncate the string if it reaches the right edge, 162 /* We make the simulator truncate the string if it reaches the right edge,
163 as otherwise it'll wrap. The real target doesn't wrap. */ 163 as otherwise it'll wrap. The real target doesn't wrap. */
164 164
165 char buffer[12]; 165 char buffer[12];
166 if(strlen(str)+x > 11 ) { 166 if(strlen(str)+x > 11 ) {
167 strncpy(buffer, str, sizeof buffer); 167 strncpy(buffer, str, sizeof buffer);
@@ -583,7 +583,7 @@ void lcd_puts_scroll(int x, int y, unsigned char* string )
583 lcd_puts(x,y,string); 583 lcd_puts(x,y,string);
584 lcd_getstringsize(string, &w, &h); 584 lcd_getstringsize(string, &w, &h);
585 585
586 if (LCD_WIDTH - x*8 - xmargin < w) 586 if ((LCD_WIDTH - x*6 - xmargin) < w)
587 { 587 {
588 /* prepare scroll line */ 588 /* prepare scroll line */
589 char *end; 589 char *end;
@@ -662,7 +662,7 @@ static void scroll_thread(void)
662 s->offset %= s->width; 662 s->offset %= s->width;
663 663
664 lcd_getstringsize(s->line, &w, &h); 664 lcd_getstringsize(s->line, &w, &h);
665 xpos = xmargin + (s->startx-1) * w / s->len; 665 xpos = xmargin + s->startx * s->width / s->len;
666 ypos = ymargin + s->starty * h; 666 ypos = ymargin + s->starty * h;
667 667
668 lcd_clearrect(xpos, ypos, LCD_WIDTH - xmargin, h); 668 lcd_clearrect(xpos, ypos, LCD_WIDTH - xmargin, h);