diff options
author | Kjell Ericson <kjell@haxx.se> | 2002-10-29 10:43:30 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2002-10-29 10:43:30 +0000 |
commit | dae8deaf1f4ce56158e9385844885f7b9faa9a42 (patch) | |
tree | 06a0fe35f25ffe2991d75c3a612cbf71bf62a61f | |
parent | fd3d50a4db38758b880908e6eb5a8601d2c10a9c (diff) | |
download | rockbox-dae8deaf1f4ce56158e9385844885f7b9faa9a42.tar.gz rockbox-dae8deaf1f4ce56158e9385844885f7b9faa9a42.zip |
The lcd_clear_display() didn't work.
Added some debug-stuff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2772 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | uisimulator/common/lcd-playersim.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c index 7c9685c5db..f789491fe1 100644 --- a/uisimulator/common/lcd-playersim.c +++ b/uisimulator/common/lcd-playersim.c @@ -209,7 +209,7 @@ void lcd_clear_display(void) int x, y; for (y=0; y<2; y++) { for (x=0; x<11; x++) { - lcd_buffer[y][x++]=lcd_ascii[' ']; + lcd_buffer[y][x]=lcd_ascii[' ']; } } lcd_update(); @@ -218,8 +218,17 @@ void lcd_clear_display(void) void lcd_puts(int x, int y, unsigned char *str) { int i; - for (i=0; *str && x<11; i++) - lcd_buffer[y][x++]=lcd_ascii[*str++]; + DEBUGF("lcd_puts(%d, %d, \"", x, y); + for (i=0; *str && x<11; i++) { +#ifdef DEBUGF + if (*str>=32 && *str<128) + {DEBUGF("%c", *str);} + else + {DEBUGF("(0x%02x)", *str);} +#endif + lcd_buffer[y][x++]=lcd_ascii[*str++]; + } + DEBUGF("\")\n"); for (; x<11; x++) lcd_buffer[y][x]=lcd_ascii[' ']; lcd_update(); @@ -230,6 +239,8 @@ void lcd_double_height(bool on) double_height = 1; if (on) double_height = 2; + lcd_display_redraw=true; + lcd_update(); } void lcd_define_pattern(int which, char *pattern, int length) @@ -239,7 +250,7 @@ void lcd_define_pattern(int which, char *pattern, int length) char icon[8]; memset(icon, 0, sizeof icon); - DEBUGF("Defining pattern %d\n", pat); + DEBUGF("Defining pattern %d:", pat); for (j = 0; j <= 5; j++) { for (i = 0; i < length; i++) { if ((pattern[i])&(1<<(j))) @@ -248,8 +259,10 @@ void lcd_define_pattern(int which, char *pattern, int length) } for (i = 1; i <= 5; i++) { + DEBUGF(" 0x%02x", icon[i]); (*font_player)[pat][i-1] = icon[i]; } + DEBUGF("\n"); lcd_display_redraw=true; lcd_update(); } @@ -258,6 +271,7 @@ extern void lcd_puts(int x, int y, unsigned char *str); void lcd_putc(int x, int y, unsigned char ch) { + DEBUGF("lcd_putc(%d, %d, %d '0x%02x')\n", x, y, ch, ch); lcd_buffer[y][x]=lcd_ascii[ch]; lcd_update(); } |