diff options
| author | Nils Wallménius <nils@rockbox.org> | 2006-12-07 17:23:52 +0000 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2006-12-07 17:23:52 +0000 |
| commit | 5652b2528d59b77e804f72d4f7c9854275e05b5a (patch) | |
| tree | b40cdffab7879a2f95fc714e90050108dad67539 /apps/plugins | |
| parent | 3183aeabacfdf16319f6a998518c405c3eede9dd (diff) | |
| download | rockbox-5652b2528d59b77e804f72d4f7c9854275e05b5a.zip rockbox-5652b2528d59b77e804f72d4f7c9854275e05b5a.tar.gz rockbox-5652b2528d59b77e804f72d4f7c9854275e05b5a.tar.bz2 rockbox-5652b2528d59b77e804f72d4f7c9854275e05b5a.tar.xz | |
Always use a black backgound while displaying images in jpegviewer, and use the usual foreground/background colors and backdrop in the jpegviewer menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11684 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/jpeg.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 878c944..f36bdd1 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c @@ -183,6 +183,9 @@ static int running_slideshow = false; /* loading image because of slideshw */ static int immediate_ata_off = false; /* power down disk after loading */ #endif static int button_timeout = HZ*5; +#if LCD_DEPTH > 1 +fb_data* old_backdrop; +#endif /**************** begin JPEG code ********************/ @@ -2103,6 +2106,16 @@ void cleanup(void *parameter) int show_menu(void) /* return 1 to quit */ { +#if LCD_DEPTH > 1 + rb->lcd_set_backdrop(old_backdrop); +#ifdef HAVE_LCD_COLOR + rb->lcd_set_foreground(rb->global_settings->fg_color); + rb->lcd_set_background(rb->global_settings->bg_color); +#else + rb->lcd_set_foreground(LCD_BLACK); + rb->lcd_set_background(LCD_WHITE); +#endif +#endif int m; int result; static const struct menu_item items[] = { @@ -2191,7 +2204,11 @@ int show_menu(void) /* return 1 to quit */ } } #endif - +#if LCD_DEPTH > 1 + rb->lcd_set_backdrop(NULL); + rb->lcd_set_foreground(LCD_WHITE); + rb->lcd_set_background(LCD_BLACK); +#endif rb->lcd_clear_display(); rb->menu_exit(m); return 0; @@ -2352,6 +2369,7 @@ int scroll_bmp(struct t_disp* pdisp) #endif if (show_menu() == 1) return PLUGIN_OK; + #ifdef USEGSLIB gray_show(true); /* switch on grayscale overlay */ #else @@ -2676,9 +2694,10 @@ int load_and_show(char* filename) if(!running_slideshow) { -#ifdef HAVE_LCD_COLOR +#if LCD_DEPTH > 1 rb->lcd_set_foreground(LCD_WHITE); rb->lcd_set_background(LCD_BLACK); + rb->lcd_set_backdrop(NULL); #endif rb->lcd_clear_display(); @@ -2838,6 +2857,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) int grayscales; long graysize; /* helper */ #endif +#if LCD_DEPTH > 1 + old_backdrop = rb->lcd_get_backdrop(); +#endif if(!parameter) return PLUGIN_ERROR; |