summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ericson <kjell@haxx.se>2002-10-29 10:43:30 +0000
committerKjell Ericson <kjell@haxx.se>2002-10-29 10:43:30 +0000
commitdae8deaf1f4ce56158e9385844885f7b9faa9a42 (patch)
tree06a0fe35f25ffe2991d75c3a612cbf71bf62a61f
parentfd3d50a4db38758b880908e6eb5a8601d2c10a9c (diff)
downloadrockbox-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.c22
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)
209 int x, y; 209 int x, y;
210 for (y=0; y<2; y++) { 210 for (y=0; y<2; y++) {
211 for (x=0; x<11; x++) { 211 for (x=0; x<11; x++) {
212 lcd_buffer[y][x++]=lcd_ascii[' ']; 212 lcd_buffer[y][x]=lcd_ascii[' '];
213 } 213 }
214 } 214 }
215 lcd_update(); 215 lcd_update();
@@ -218,8 +218,17 @@ void lcd_clear_display(void)
218void lcd_puts(int x, int y, unsigned char *str) 218void lcd_puts(int x, int y, unsigned char *str)
219{ 219{
220 int i; 220 int i;
221 for (i=0; *str && x<11; i++) 221 DEBUGF("lcd_puts(%d, %d, \"", x, y);
222 lcd_buffer[y][x++]=lcd_ascii[*str++]; 222 for (i=0; *str && x<11; i++) {
223#ifdef DEBUGF
224 if (*str>=32 && *str<128)
225 {DEBUGF("%c", *str);}
226 else
227 {DEBUGF("(0x%02x)", *str);}
228#endif
229 lcd_buffer[y][x++]=lcd_ascii[*str++];
230 }
231 DEBUGF("\")\n");
223 for (; x<11; x++) 232 for (; x<11; x++)
224 lcd_buffer[y][x]=lcd_ascii[' ']; 233 lcd_buffer[y][x]=lcd_ascii[' '];
225 lcd_update(); 234 lcd_update();
@@ -230,6 +239,8 @@ void lcd_double_height(bool on)
230 double_height = 1; 239 double_height = 1;
231 if (on) 240 if (on)
232 double_height = 2; 241 double_height = 2;
242 lcd_display_redraw=true;
243 lcd_update();
233} 244}
234 245
235void lcd_define_pattern(int which, char *pattern, int length) 246void lcd_define_pattern(int which, char *pattern, int length)
@@ -239,7 +250,7 @@ void lcd_define_pattern(int which, char *pattern, int length)
239 char icon[8]; 250 char icon[8];
240 memset(icon, 0, sizeof icon); 251 memset(icon, 0, sizeof icon);
241 252
242 DEBUGF("Defining pattern %d\n", pat); 253 DEBUGF("Defining pattern %d:", pat);
243 for (j = 0; j <= 5; j++) { 254 for (j = 0; j <= 5; j++) {
244 for (i = 0; i < length; i++) { 255 for (i = 0; i < length; i++) {
245 if ((pattern[i])&(1<<(j))) 256 if ((pattern[i])&(1<<(j)))
@@ -248,8 +259,10 @@ void lcd_define_pattern(int which, char *pattern, int length)
248 } 259 }
249 for (i = 1; i <= 5; i++) 260 for (i = 1; i <= 5; i++)
250 { 261 {
262 DEBUGF(" 0x%02x", icon[i]);
251 (*font_player)[pat][i-1] = icon[i]; 263 (*font_player)[pat][i-1] = icon[i];
252 } 264 }
265 DEBUGF("\n");
253 lcd_display_redraw=true; 266 lcd_display_redraw=true;
254 lcd_update(); 267 lcd_update();
255} 268}
@@ -258,6 +271,7 @@ extern void lcd_puts(int x, int y, unsigned char *str);
258 271
259void lcd_putc(int x, int y, unsigned char ch) 272void lcd_putc(int x, int y, unsigned char ch)
260{ 273{
274 DEBUGF("lcd_putc(%d, %d, %d '0x%02x')\n", x, y, ch, ch);
261 lcd_buffer[y][x]=lcd_ascii[ch]; 275 lcd_buffer[y][x]=lcd_ascii[ch];
262 lcd_update(); 276 lcd_update();
263} 277}