forked from len0rd/rockbox
Fix bug #5724 - Missing characters in text viewer, the number of characters in the line to display was calculated with a too wide character as reference
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10395 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c5116a40e1
commit
73c283e969
1 changed files with 2 additions and 2 deletions
|
@ -268,7 +268,7 @@ bool done = false;
|
||||||
int col = 0;
|
int col = 0;
|
||||||
|
|
||||||
#define ADVANCE_COUNTERS(c) { width += glyph_width(c); k++; }
|
#define ADVANCE_COUNTERS(c) { width += glyph_width(c); k++; }
|
||||||
#define LINE_IS_FULL ((k<MAX_COLUMNS-1) ||( width > draw_columns))
|
#define LINE_IS_FULL ((k>=MAX_COLUMNS-1) ||( width >= draw_columns))
|
||||||
#define LINE_IS_NOT_FULL ((k<MAX_COLUMNS-1) &&( width < draw_columns))
|
#define LINE_IS_NOT_FULL ((k<MAX_COLUMNS-1) &&( width < draw_columns))
|
||||||
static unsigned char* crop_at_width(const unsigned char* p)
|
static unsigned char* crop_at_width(const unsigned char* p)
|
||||||
{
|
{
|
||||||
|
@ -741,7 +741,7 @@ static void viewer_draw(int col)
|
||||||
if (col != -1) {
|
if (col != -1) {
|
||||||
scratch_buffer[k] = 0;
|
scratch_buffer[k] = 0;
|
||||||
endptr = rb->iso_decode(scratch_buffer + col, utf8_buffer,
|
endptr = rb->iso_decode(scratch_buffer + col, utf8_buffer,
|
||||||
prefs.encoding, draw_columns/glyph_width('a'));
|
prefs.encoding, draw_columns/glyph_width('i'));
|
||||||
*endptr = 0;
|
*endptr = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue