forked from len0rd/rockbox
Major Code Police raid strike-down.
Fix yellow build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3191 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b8a861841e
commit
0c4a35fbcf
1 changed files with 114 additions and 98 deletions
|
|
@ -197,18 +197,22 @@ void xlcd_update(void)
|
|||
int map_ch=lcd_ascii[ch];
|
||||
if (map_ch<512) {
|
||||
hw_ch=map_ch;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
map_ch=map_ch-512;
|
||||
if (extended_chars_mapped[map_ch]!=NO_CHAR) {
|
||||
hw_ch=extended_chars_mapped[map_ch];
|
||||
extended_pattern_usage[hw_ch]++;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
int pat;
|
||||
pat=lcd_get_free_pat(map_ch);
|
||||
if (pat<0) {
|
||||
DEBUGF("Substitute for %02x (map 0x%02x) is used.\n", ch, map_ch);
|
||||
DEBUGF("Substitute for %02x (map 0x%02x)"
|
||||
" is used.\n", ch, map_ch);
|
||||
/* Find substitute char */
|
||||
map_ch=lcd_player_extended_lcd_to_rocklatin1[map_ch];
|
||||
map_ch=
|
||||
lcd_player_extended_lcd_to_rocklatin1[map_ch];
|
||||
hw_ch=lcd_ascii[map_ch];
|
||||
} else {
|
||||
#ifdef DEBUG
|
||||
|
|
@ -220,7 +224,8 @@ void xlcd_update(void)
|
|||
extended_pattern_content[pat]=map_ch;
|
||||
extended_pattern_usage[pat]=1;
|
||||
lcd_define_hw_pattern(pat*8,
|
||||
extended_font_player[map_ch], 8);
|
||||
extended_font_player[map_ch],
|
||||
8);
|
||||
hw_ch=pat;
|
||||
}
|
||||
}
|
||||
|
|
@ -292,9 +297,13 @@ static void lcd_puts_cont_scroll(int x, int y, unsigned char *string)
|
|||
{
|
||||
#ifdef DEBUGF
|
||||
if (*string>=32 && *string<128)
|
||||
{DEBUGF("%c", *string);}
|
||||
{
|
||||
DEBUGF("%c", *string);
|
||||
}
|
||||
else
|
||||
{DEBUGF("(0x%02x)", *string);}
|
||||
{
|
||||
DEBUGF("(0x%02x)", *string);
|
||||
}
|
||||
#endif
|
||||
/* We should check if char is over 256 */
|
||||
update|=lcdx_putc(x, y, *(unsigned char*)string++);
|
||||
|
|
@ -315,7 +324,7 @@ void lcd_puts(int x, int y, unsigned char *string)
|
|||
|
||||
void lcd_put_cursor(int x, int y, char cursor_char)
|
||||
{
|
||||
if (cursor.len==0) {
|
||||
if (cursor.len == 0) {
|
||||
cursor.text[0]=buffer_xlcd[x][y];
|
||||
cursor.text[1]=cursor_char;
|
||||
cursor.len=2;
|
||||
|
|
@ -330,9 +339,12 @@ void lcd_put_cursor(int x, int y, char cursor_char)
|
|||
void lcd_remove_cursor(void)
|
||||
{
|
||||
if (cursor.len!=0) {
|
||||
bool up;
|
||||
cursor.len=0;
|
||||
if (lcdx_putc(cursor.x_pos, cursor.y_pos, cursor.text[0]))
|
||||
up = lcdx_putc(cursor.x_pos, cursor.y_pos, cursor.text[0]);
|
||||
#ifdef SIMULATOR
|
||||
lcd_update();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -471,7 +483,8 @@ void lcd_init (void)
|
|||
lcd_pram = NEW_LCD_PRAM;
|
||||
lcd_iram = NEW_LCD_IRAM;
|
||||
pattern_size=7; /* Last pattern, 3 for old LCD, 7 for new LCD */
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
lcd_ascii = old_lcd_rocklatin1_to_xlcd;
|
||||
lcd_contrast_set = OLD_LCD_CONTRAST_SET;
|
||||
lcd_cram = OLD_LCD_CRAM;
|
||||
|
|
@ -512,15 +525,18 @@ void lcd_puts_scroll(int x, int y, unsigned char* string )
|
|||
s->turn_offset=-1;
|
||||
if (bidir_limit && (s->textlen < ((11-x)*(100+bidir_limit))/100)) {
|
||||
s->turn_offset=s->textlen+x-11;
|
||||
} else {
|
||||
for (i=0; i<scroll_spacing && s->textlen<(int)sizeof(s->text); i++) {
|
||||
}
|
||||
else {
|
||||
for (i=0; i<scroll_spacing &&
|
||||
s->textlen<(int)sizeof(s->text); i++) {
|
||||
s->text[s->textlen++]=' ';
|
||||
}
|
||||
}
|
||||
if (s->textlen<(int)sizeof(s->text))
|
||||
s->text[s->textlen]=' ';
|
||||
s->text[sizeof s->text - 1] = 0;
|
||||
} else
|
||||
}
|
||||
else
|
||||
s->mode = SCROLL_MODE_OFF;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue