Fix freeze/crash problems when scrolling very long strings (like filenames or tags).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11789 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
84a013ea41
commit
c0b2862956
2 changed files with 4 additions and 3 deletions
|
@ -131,8 +131,8 @@ void arabjoin(unsigned short * stringprt, int length){
|
||||||
unsigned short *bidi_l2v(const unsigned char *str, int orientation)
|
unsigned short *bidi_l2v(const unsigned char *str, int orientation)
|
||||||
{
|
{
|
||||||
int length = utf8length(str);
|
int length = utf8length(str);
|
||||||
static unsigned short utf16_buf[MAX_PATH+1];
|
static unsigned short utf16_buf[SCROLL_LINE_SIZE];
|
||||||
static unsigned short bidi_buf[MAX_PATH+1];
|
static unsigned short bidi_buf[SCROLL_LINE_SIZE];
|
||||||
unsigned short *heb_str, *target, *tmp; // *broken_str
|
unsigned short *heb_str, *target, *tmp; // *broken_str
|
||||||
int block_start, block_end, block_type, block_length, i;
|
int block_start, block_end, block_type, block_length, i;
|
||||||
//long max_chars=0;
|
//long max_chars=0;
|
||||||
|
|
|
@ -367,9 +367,10 @@ extern void lcd_bitmap_transparent(const fb_data *src, int x, int y,
|
||||||
/* internal usage, but in multiple drivers */
|
/* internal usage, but in multiple drivers */
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
#define SCROLL_SPACING 3
|
#define SCROLL_SPACING 3
|
||||||
|
#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2)
|
||||||
|
|
||||||
struct scrollinfo {
|
struct scrollinfo {
|
||||||
char line[MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2];
|
char line[SCROLL_LINE_SIZE];
|
||||||
int len; /* length of line in chars */
|
int len; /* length of line in chars */
|
||||||
int width; /* length of line in pixels */
|
int width; /* length of line in pixels */
|
||||||
int offset;
|
int offset;
|
||||||
|
|
Loading…
Reference in a new issue