diff options
author | Jens Arnold <amiconn@rockbox.org> | 2009-03-07 01:22:49 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2009-03-07 01:22:49 +0000 |
commit | 9a6d91940c6e3c58bdeb015855e3177bcb382c72 (patch) | |
tree | e96cfafc83fdf7379f92a821887d40c8af679862 /apps | |
parent | 5e313256b2d506054de8c1ac35816eb5002506d0 (diff) | |
download | rockbox-9a6d91940c6e3c58bdeb015855e3177bcb382c72.tar.gz rockbox-9a6d91940c6e3c58bdeb015855e3177bcb382c72.zip |
Mono targets: Make sure the splash screen uses white on black and the logo doesn't look inverted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20224 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/pictureflow.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index 57d0bbcd95..148c5aa0a1 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c | |||
@@ -46,9 +46,14 @@ const struct button_mapping *plugin_contexts[] | |||
46 | #if LCD_DEPTH < 8 | 46 | #if LCD_DEPTH < 8 |
47 | #if LCD_DEPTH > 1 | 47 | #if LCD_DEPTH > 1 |
48 | #define N_BRIGHT(y) LCD_BRIGHTNESS(y) | 48 | #define N_BRIGHT(y) LCD_BRIGHTNESS(y) |
49 | #else | 49 | #else /* LCD_DEPTH <= 1 */ |
50 | #define N_BRIGHT(y) ((y > 127) ? 0 : 1) | 50 | #define N_BRIGHT(y) ((y > 127) ? 0 : 1) |
51 | #ifdef HAVE_NEGATIVE_LCD /* m:robe 100, Clip */ | ||
52 | #define PICTUREFLOW_DRMODE DRMODE_SOLID | ||
53 | #else | ||
54 | #define PICTUREFLOW_DRMODE (DRMODE_SOLID|DRMODE_INVERSEVID) | ||
51 | #endif | 55 | #endif |
56 | #endif /* LCD_DEPTH <= 1 */ | ||
52 | #define USEGSLIB | 57 | #define USEGSLIB |
53 | GREY_INFO_STRUCT | 58 | GREY_INFO_STRUCT |
54 | #define LCD_BUF _grey_info.buffer | 59 | #define LCD_BUF _grey_info.buffer |
@@ -60,7 +65,7 @@ GREY_INFO_STRUCT | |||
60 | #define BUFFER_WIDTH _grey_info.width | 65 | #define BUFFER_WIDTH _grey_info.width |
61 | #define BUFFER_HEIGHT _grey_info.height | 66 | #define BUFFER_HEIGHT _grey_info.height |
62 | typedef unsigned char pix_t; | 67 | typedef unsigned char pix_t; |
63 | #else | 68 | #else /* LCD_DEPTH >= 8 */ |
64 | #define LCD_BUF rb->lcd_framebuffer | 69 | #define LCD_BUF rb->lcd_framebuffer |
65 | #define MYLCD(fn) rb->lcd_ ## fn | 70 | #define MYLCD(fn) rb->lcd_ ## fn |
66 | #define G_PIX LCD_RGBPACK | 71 | #define G_PIX LCD_RGBPACK |
@@ -70,7 +75,7 @@ typedef unsigned char pix_t; | |||
70 | #define BUFFER_WIDTH LCD_WIDTH | 75 | #define BUFFER_WIDTH LCD_WIDTH |
71 | #define BUFFER_HEIGHT LCD_HEIGHT | 76 | #define BUFFER_HEIGHT LCD_HEIGHT |
72 | typedef fb_data pix_t; | 77 | typedef fb_data pix_t; |
73 | #endif | 78 | #endif /* LCD_DEPTH >= 8 */ |
74 | 79 | ||
75 | #ifdef HAVE_SCROLLWHEEL | 80 | #ifdef HAVE_SCROLLWHEEL |
76 | #define PICTUREFLOW_NEXT_ALBUM PLA_DOWN | 81 | #define PICTUREFLOW_NEXT_ALBUM PLA_DOWN |
@@ -749,15 +754,23 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf, | |||
749 | void draw_splashscreen(void) | 754 | void draw_splashscreen(void) |
750 | { | 755 | { |
751 | struct screen* display = rb->screens[0]; | 756 | struct screen* display = rb->screens[0]; |
757 | const struct picture* logo = &(logos[display->screen_type]); | ||
752 | 758 | ||
753 | #if LCD_DEPTH > 1 | 759 | #if LCD_DEPTH > 1 |
754 | rb->lcd_set_background(N_BRIGHT(0)); | 760 | rb->lcd_set_background(N_BRIGHT(0)); |
755 | rb->lcd_set_foreground(N_BRIGHT(255)); | 761 | rb->lcd_set_foreground(N_BRIGHT(255)); |
762 | #else | ||
763 | rb->lcd_set_drawmode(PICTUREFLOW_DRMODE); | ||
756 | #endif | 764 | #endif |
757 | rb->lcd_clear_display(); | 765 | rb->lcd_clear_display(); |
758 | 766 | ||
759 | const struct picture* logo = &(logos[display->screen_type]); | 767 | #if LCD_DEPTH == 1 /* Mono LCDs need the logo inverted */ |
768 | rb->lcd_set_drawmode(PICTUREFLOW_DRMODE ^ DRMODE_INVERSEVID); | ||
760 | picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 10); | 769 | picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 10); |
770 | rb->lcd_set_drawmode(PICTUREFLOW_DRMODE); | ||
771 | #else | ||
772 | picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 10); | ||
773 | #endif | ||
761 | 774 | ||
762 | rb->lcd_update(); | 775 | rb->lcd_update(); |
763 | } | 776 | } |