diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2007-03-27 22:14:53 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2007-03-27 22:14:53 +0000 |
| commit | a4ef0c48976d9d33aaa64b32827974bdd51f7614 (patch) | |
| tree | 289a15fc3a1e6d105b78e99e6f27b0e68bb956a0 | |
| parent | 45581245de346330d9f53f49d6d0ff333d93a78e (diff) | |
| download | rockbox-a4ef0c48976d9d33aaa64b32827974bdd51f7614.zip rockbox-a4ef0c48976d9d33aaa64b32827974bdd51f7614.tar.gz rockbox-a4ef0c48976d9d33aaa64b32827974bdd51f7614.tar.bz2 rockbox-a4ef0c48976d9d33aaa64b32827974bdd51f7614.tar.xz | |
(all targets) Increase scrolling line size to account for utf-8 in the overlap. (player) Fix utf-8-related scroll-around display bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12943 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/lcd-charcell.c | 2 | ||||
| -rw-r--r-- | firmware/export/lcd.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c index ce0eca9..e68b35a 100644 --- a/firmware/drivers/lcd-charcell.c +++ b/firmware/drivers/lcd-charcell.c @@ -520,7 +520,7 @@ void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, } end = strchr(s->line, '\0'); - strncpy(end, string, LCD_WIDTH); + strncpy(end, string, utf8seek(s->line, LCD_WIDTH)); s->offset = offset; s->startx = xmargin + x; diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 0d56389..48de53a 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -382,9 +382,9 @@ extern void lcd_bitmap_transparent(const fb_data *src, int x, int y, /* internal usage, but in multiple drivers */ #define SCROLL_SPACING 3 #ifdef HAVE_LCD_BITMAP -#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2) +#define SCROLL_LINE_SIZE (MAX_PATH + SCROLL_SPACING + 3*LCD_WIDTH/2 + 2) #else -#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH + SCROLL_SPACING + 2) +#define SCROLL_LINE_SIZE (MAX_PATH + SCROLL_SPACING + 3*LCD_WIDTH + 2) #endif struct scrollinfo { |