diff options
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/common/lcd-playersim.c | 6 |
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); |