diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-09-02 05:39:09 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-09-02 05:39:09 +0000 |
commit | 60895bc107f5689f19de61828d8ffe0f2f1f59b5 (patch) | |
tree | 0141dc6cada785f2c7c6b6655820567432c353ec /apps/misc.c | |
parent | 58e9412bff9947e4514c0d55152bfad91049a60c (diff) | |
download | rockbox-60895bc107f5689f19de61828d8ffe0f2f1f59b5.tar.gz rockbox-60895bc107f5689f19de61828d8ffe0f2f1f59b5.zip |
Patch #1272052 by Henrik Backe - Move credits to a plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7450 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 53 |
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 | |||
494 | int 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 | } | ||