summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-10 20:27:03 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-10 20:27:03 +0000
commit7dc1e220d20710f711e69174682119413eebfd79 (patch)
tree12303eb1473f0e56c9c0d09f825e324d62f3f591 /firmware
parente63f1ecb97085b7eb67ea1d54f736a074ee9701d (diff)
downloadrockbox-7dc1e220d20710f711e69174682119413eebfd79.tar.gz
rockbox-7dc1e220d20710f711e69174682119413eebfd79.tar.bz2
rockbox-7dc1e220d20710f711e69174682119413eebfd79.zip
panicf: Clear backdrop and print with black font on white background to prevent possible difficulties with reading it (especially on cabbiev2). Also start printing in the second row and column.
This fixes the second part of FS#10503 - "Menu and WPS backdrop not cleared when shutting down or during panic" (the first part is not a bug imo), git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22242 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/panic.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/firmware/panic.c b/firmware/panic.c
index 0790835ac5..84bd30ae7b 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -59,16 +59,24 @@ void panicf( const char *fmt, ...)
lcd_puts(0, 0, "*PANIC*");
lcd_puts(0, 1, panic_buf);
#elif defined(HAVE_LCD_BITMAP)
+ int y = 1;
+
+#ifdef LCD_DEPTH > 1
+ lcd_set_backdrop(NULL);
+ lcd_set_foreground(LCD_BLACK);
+ lcd_set_background(LCD_WHITE);
+#endif
+
lcd_clear_display();
lcd_setfont(FONT_SYSFIXED);
- lcd_puts(0, 0, (unsigned char *)"*PANIC*");
+ lcd_puts(1, y++, (unsigned char *)"*PANIC*");
{
/* wrap panic line */
- int i, y=1, len = strlen(panic_buf);
+ int i, len = strlen(panic_buf);
for (i=0; i<len; i+=LINECHARS) {
unsigned char c = panic_buf[i+LINECHARS];
panic_buf[i+LINECHARS] = 0;
- lcd_puts(0, y++, (unsigned char *)panic_buf+i);
+ lcd_puts(1, y++, (unsigned char *)panic_buf+i);
panic_buf[i+LINECHARS] = c;
}
}