summaryrefslogtreecommitdiff
path: root/apps/plugins/jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/jpeg.c')
-rw-r--r--apps/plugins/jpeg.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index 878c94408e..f36bdd1bb3 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 */
183static int immediate_ata_off = false; /* power down disk after loading */ 183static int immediate_ata_off = false; /* power down disk after loading */
184#endif 184#endif
185static int button_timeout = HZ*5; 185static int button_timeout = HZ*5;
186#if LCD_DEPTH > 1
187fb_data* old_backdrop;
188#endif
186 189
187/**************** begin JPEG code ********************/ 190/**************** begin JPEG code ********************/
188 191
@@ -2103,6 +2106,16 @@ void cleanup(void *parameter)
2103 2106
2104int show_menu(void) /* return 1 to quit */ 2107int show_menu(void) /* return 1 to quit */
2105{ 2108{
2109#if LCD_DEPTH > 1
2110 rb->lcd_set_backdrop(old_backdrop);
2111#ifdef HAVE_LCD_COLOR
2112 rb->lcd_set_foreground(rb->global_settings->fg_color);
2113 rb->lcd_set_background(rb->global_settings->bg_color);
2114#else
2115 rb->lcd_set_foreground(LCD_BLACK);
2116 rb->lcd_set_background(LCD_WHITE);
2117#endif
2118#endif
2106 int m; 2119 int m;
2107 int result; 2120 int result;
2108 static const struct menu_item items[] = { 2121 static const struct menu_item items[] = {
@@ -2191,7 +2204,11 @@ int show_menu(void) /* return 1 to quit */
2191 } 2204 }
2192 } 2205 }
2193#endif 2206#endif
2194 2207#if LCD_DEPTH > 1
2208 rb->lcd_set_backdrop(NULL);
2209 rb->lcd_set_foreground(LCD_WHITE);
2210 rb->lcd_set_background(LCD_BLACK);
2211#endif
2195 rb->lcd_clear_display(); 2212 rb->lcd_clear_display();
2196 rb->menu_exit(m); 2213 rb->menu_exit(m);
2197 return 0; 2214 return 0;
@@ -2352,6 +2369,7 @@ int scroll_bmp(struct t_disp* pdisp)
2352#endif 2369#endif
2353 if (show_menu() == 1) 2370 if (show_menu() == 1)
2354 return PLUGIN_OK; 2371 return PLUGIN_OK;
2372
2355#ifdef USEGSLIB 2373#ifdef USEGSLIB
2356 gray_show(true); /* switch on grayscale overlay */ 2374 gray_show(true); /* switch on grayscale overlay */
2357#else 2375#else
@@ -2676,9 +2694,10 @@ int load_and_show(char* filename)
2676 2694
2677 if(!running_slideshow) 2695 if(!running_slideshow)
2678 { 2696 {
2679#ifdef HAVE_LCD_COLOR 2697#if LCD_DEPTH > 1
2680 rb->lcd_set_foreground(LCD_WHITE); 2698 rb->lcd_set_foreground(LCD_WHITE);
2681 rb->lcd_set_background(LCD_BLACK); 2699 rb->lcd_set_background(LCD_BLACK);
2700 rb->lcd_set_backdrop(NULL);
2682#endif 2701#endif
2683 2702
2684 rb->lcd_clear_display(); 2703 rb->lcd_clear_display();
@@ -2838,6 +2857,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
2838 int grayscales; 2857 int grayscales;
2839 long graysize; /* helper */ 2858 long graysize; /* helper */
2840#endif 2859#endif
2860#if LCD_DEPTH > 1
2861 old_backdrop = rb->lcd_get_backdrop();
2862#endif
2841 2863
2842 if(!parameter) return PLUGIN_ERROR; 2864 if(!parameter) return PLUGIN_ERROR;
2843 2865