summaryrefslogtreecommitdiffstats
path: root/uisimulator/common/lcd-playersim.c
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/common/lcd-playersim.c
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/common/lcd-playersim.c')
-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)
#if defined(HAVE_LCD_CHARCELLS)
/* We make the simulator truncate the string if it reaches the right edge,
as otherwise it'll wrap. The real target doesn't wrap. */
-
+
char buffer[12];
if(strlen(str)+x > 11 ) {
strncpy(buffer, str, sizeof buffer);
@@ -583,7 +583,7 @@ void lcd_puts_scroll(int x, int y, unsigned char* string )
lcd_puts(x,y,string);
lcd_getstringsize(string, &w, &h);
- if (LCD_WIDTH - x*8 - xmargin < w)
+ if ((LCD_WIDTH - x*6 - xmargin) < w)
{
/* prepare scroll line */
char *end;
@@ -662,7 +662,7 @@ static void scroll_thread(void)
s->offset %= s->width;
lcd_getstringsize(s->line, &w, &h);
- xpos = xmargin + (s->startx-1) * w / s->len;
+ xpos = xmargin + s->startx * s->width / s->len;
ypos = ymargin + s->starty * h;
lcd_clearrect(xpos, ypos, LCD_WIDTH - xmargin, h);