Index: src/apps/plugins/pictureflow/pictureflow.c =================================================================== --- src/apps/plugins/pictureflow/pictureflow.c (revision 26185) +++ src/apps/plugins/pictureflow/pictureflow.c (working copy) @@ -221,6 +221,12 @@ #define DISPLAY_LEFT_R (PFREAL_HALF - LCD_WIDTH * PFREAL_HALF) #define MAXSLIDE_LEFT_R (PFREAL_HALF - DISPLAY_WIDTH * PFREAL_HALF) +#if LCD_HEIGHT > 100 +#define NO_REFLECT_HEIGHT LCD_HEIGHT/2 +#else +#define NO_REFLECT_HEIGHT (LCD_HEIGHT-DISPLAY_OFFS) +#endif + #define SLIDE_CACHE_SIZE 64 /* probably more than can be loaded */ #define MAX_SLIDES_COUNT 10 @@ -316,6 +322,7 @@ static int cache_version = 0; static int show_album_name = (LCD_HEIGHT > 100) ? album_name_top : album_name_bottom; +static bool show_reflection = true; static struct configdata config[] = { @@ -330,7 +337,8 @@ { TYPE_BOOL, 0, 1, { .bool_p = &resize }, "resize", NULL }, { TYPE_INT, 0, 100, { .int_p = &cache_version }, "cache version", NULL }, { TYPE_ENUM, 0, 2, { .int_p = &show_album_name }, "show album name", - show_album_name_conf } + show_album_name_conf }, + { TYPE_BOOL, 0, 1, { .bool_p = &show_reflection }, "show reflection", NULL } }; #define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata)) @@ -1742,7 +1750,7 @@ int p = (bmp->height-1-DISPLAY_OFFS) * PFREAL_ONE; int plim = MAX(0, p - (LCD_HEIGHT/2-1) * dy); - pix_t *pixel = LCDADDR(x, (LCD_HEIGHT/2)-1 ); + pix_t *pixel = LCDADDR(x, show_reflection ? (LCD_HEIGHT/2)-1 : NO_REFLECT_HEIGHT-1); if (alpha == 256) { while (p >= plim) { @@ -1761,7 +1769,7 @@ plim = MIN(sh * PFREAL_ONE, p + (LCD_HEIGHT/2) * dy); int plim2 = MIN(MIN(sh + REFLECT_HEIGHT, sh * 2) * PFREAL_ONE, p + (LCD_HEIGHT/2) * dy); - pixel = LCDADDR(x, (LCD_HEIGHT/2) ); + pixel = LCDADDR(x, show_reflection ? LCD_HEIGHT/2 : NO_REFLECT_HEIGHT); if (alpha == 256) { while (p < plim) { @@ -1776,7 +1784,8 @@ pixel += PIXELSTEP_Y; } } - while (p < plim2) { + if(show_reflection) + while (p < plim2) { int ty = (((unsigned)p) >> PFREAL_SHIFT) - sh; int lalpha = reftab[ty]; *pixel = fade_color(ptr[sh - 1 - ty], lalpha); @@ -2072,7 +2081,8 @@ MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", "Spacing", "Centre margin", "Number of slides", "Zoom", - "Show album title", "Resize Covers", "Rebuild cache"); + "Show album title", "Resize Covers", "Rebuild cache", + "Reflection"); static const struct opt_items album_name_options[] = { { "Hide album title", -1 }, @@ -2135,7 +2145,9 @@ rb->remove(EMPTY_SLIDE); rb->splash(HZ, "Cache will be rebuilt on next restart"); break; - + case 8: + rb->set_bool("Reflection", &show_reflection); + break; case MENU_ATTACHED_USB: return PLUGIN_USB_CONNECTED; }