From a355d40b33cd69cf0f6127a7c1a1a51744328132 Mon Sep 17 00:00:00 2001 From: kugel Date: Mon, 10 Aug 2009 20:27:03 +0000 Subject: [PATCH] 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 --- firmware/panic.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/firmware/panic.c b/firmware/panic.c index 0790835ac..84bd30ae7 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