summaryrefslogtreecommitdiff
path: root/apps/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c
index 6751da9d69..ddf8d06e7b 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -24,6 +24,7 @@
24#include "file.h" 24#include "file.h"
25#include "dir.h" 25#include "dir.h"
26#include "lcd.h" 26#include "lcd.h"
27#include "lcd-remote.h"
27#include "sprintf.h" 28#include "sprintf.h"
28#include "errno.h" 29#include "errno.h"
29#include "system.h" 30#include "system.h"
@@ -40,10 +41,17 @@
40#include "powermgmt.h" 41#include "powermgmt.h"
41#include "backlight.h" 42#include "backlight.h"
42#include "atoi.h" 43#include "atoi.h"
44#include "version.h"
45#include "font.h"
43#ifdef HAVE_MMC 46#ifdef HAVE_MMC
44#include "ata_mmc.h" 47#include "ata_mmc.h"
45#endif 48#endif
46 49
50#ifdef HAVE_LCD_BITMAP
51#include "bmp.h"
52#include "icons.h"
53#endif /* End HAVE_LCD_BITMAP */
54
47/* Format a large-range value for output, using the appropriate unit so that 55/* Format a large-range value for output, using the appropriate unit so that
48 * the displayed value is in the range 1 <= display < 1000 (1024 for "binary" 56 * the displayed value is in the range 1 <= display < 1000 (1024 for "binary"
49 * units) if possible, and 3 significant digits are shown. If a buffer is 57 * units) if possible, and 3 significant digits are shown. If a buffer is
@@ -482,3 +490,48 @@ long default_event_handler(long event)
482{ 490{
483 return default_event_handler_ex(event, NULL, NULL); 491 return default_event_handler_ex(event, NULL, NULL);
484} 492}
493
494int show_logo( void )
495{
496#ifdef HAVE_LCD_BITMAP
497 char version[32];
498 int font_h, font_w;
499
500 lcd_clear_display();
501#if LCD_WIDTH == 112 || LCD_WIDTH == 128
502 lcd_bitmap(rockbox112x37, 0, 10, 112, 37);
503#endif
504#if LCD_WIDTH >= 160
505 lcd_bitmap(rockbox160x53x2, 0, 10, 160, 53);
506#endif
507
508#ifdef HAVE_REMOTE_LCD
509 lcd_remote_clear_display();
510 lcd_remote_bitmap(rockbox112x37,10,14,112,37);
511#endif
512
513 snprintf(version, sizeof(version), "Ver. %s", appsversion);
514 lcd_setfont(FONT_SYSFIXED);
515 lcd_getstringsize("A", &font_w, &font_h);
516 lcd_putsxy((LCD_WIDTH/2) - ((strlen(version)*font_w)/2),
517 LCD_HEIGHT-font_h, version);
518 lcd_update();
519
520#ifdef HAVE_REMOTE_LCD
521 lcd_remote_setfont(FONT_SYSFIXED);
522 lcd_remote_getstringsize("A", &font_w, &font_h);
523 lcd_remote_putsxy((LCD_REMOTE_WIDTH/2) - ((strlen(version)*font_w)/2),
524 LCD_REMOTE_HEIGHT-font_h, version);
525 lcd_remote_update();
526#endif
527
528#else
529 char *rockbox = " ROCKbox!";
530 lcd_clear_display();
531 lcd_double_height(true);
532 lcd_puts(0, 0, rockbox);
533 lcd_puts(0, 1, appsversion);
534#endif
535
536 return 0;
537}