summaryrefslogtreecommitdiff
path: root/apps/plugins/pictureflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pictureflow.c')
-rw-r--r--apps/plugins/pictureflow.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index 807ba19e7e..b107227e40 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -203,22 +203,25 @@ static int slide_spacing = (LCD_WIDTH - DISPLAY_WIDTH) / 8;
203static int center_margin = (LCD_WIDTH - DISPLAY_WIDTH) / 16; 203static int center_margin = (LCD_WIDTH - DISPLAY_WIDTH) / 16;
204static int num_slides = 4; 204static int num_slides = 4;
205static int zoom = 100; 205static int zoom = 100;
206static int show_fps = false; 206static bool show_fps = false;
207static int resize = true; 207static bool resize = true;
208static int cache_version = 0; 208static int cache_version = 0;
209static int show_album_name = album_name_top; 209static int show_album_name = album_name_top;
210 210
211static struct configdata config[] = 211static struct configdata config[] =
212{ 212{
213 { TYPE_INT, 0, MAX_SPACING, &slide_spacing, "slide spacing", NULL, NULL }, 213 { TYPE_INT, 0, MAX_SPACING, { .int_p = &slide_spacing }, "slide spacing",
214 { TYPE_INT, 0, MAX_MARGIN, &center_margin, "center margin", NULL, NULL }, 214 NULL },
215 { TYPE_INT, 0, MAX_SLIDES_COUNT, &num_slides, "slides count", NULL, NULL }, 215 { TYPE_INT, 0, MAX_MARGIN, { .int_p = &center_margin }, "center margin",
216 { TYPE_INT, 0, 300, &zoom, "zoom", NULL, NULL }, 216 NULL },
217 { TYPE_INT, 0, 1, &show_fps, "show fps", NULL, NULL }, 217 { TYPE_INT, 0, MAX_SLIDES_COUNT, { .int_p = &num_slides }, "slides count",
218 { TYPE_INT, 0, 1, &resize, "resize", NULL, NULL }, 218 NULL },
219 { TYPE_INT, 0, 100, &cache_version, "cache version", NULL, NULL }, 219 { TYPE_INT, 0, 300, { .int_p = &zoom }, "zoom", NULL },
220 { TYPE_ENUM, 0, 2, &show_album_name, "show album name", 220 { TYPE_BOOL, 0, 1, { .bool_p = &show_fps }, "show fps", NULL },
221 show_album_name_conf, NULL } 221 { TYPE_BOOL, 0, 1, { .bool_p = &resize }, "resize", NULL },
222 { TYPE_INT, 0, 100, { .int_p = &cache_version }, "cache version", NULL },
223 { TYPE_ENUM, 0, 2, { .int_p = &show_album_name }, "show album name",
224 show_album_name_conf }
222}; 225};
223 226
224#define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata)) 227#define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata))
@@ -1555,7 +1558,6 @@ int settings_menu(void)
1555{ 1558{
1556 int selection = 0; 1559 int selection = 0;
1557 bool old_val; 1560 bool old_val;
1558 bool new_val;
1559 1561
1560 MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", 1562 MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS",
1561 "Spacing", "Center margin", "Number of slides", "Zoom", 1563 "Spacing", "Center margin", "Number of slides", "Zoom",
@@ -1565,9 +1567,7 @@ int settings_menu(void)
1565 selection=rb->do_menu(&settings_menu,&selection, NULL, false); 1567 selection=rb->do_menu(&settings_menu,&selection, NULL, false);
1566 switch(selection) { 1568 switch(selection) {
1567 case 0: 1569 case 0:
1568 new_val = show_fps; 1570 rb->set_bool("Show FPS", &show_fps);
1569 rb->set_bool("Show FPS", &new_val);
1570 show_fps = new_val;
1571 reset_track_list(); 1571 reset_track_list();
1572 break; 1572 break;
1573 1573
@@ -1607,10 +1607,9 @@ int settings_menu(void)
1607 reset_slides(); 1607 reset_slides();
1608 break; 1608 break;
1609 case 6: 1609 case 6:
1610 old_val = new_val = resize; 1610 old_val = resize;
1611 rb->set_bool("Resize Covers", &new_val); 1611 rb->set_bool("Resize Covers", &resize);
1612 resize = new_val; 1612 if (old_val == resize) /* changed? */
1613 if (old_val == new_val) /* changed? */
1614 break; 1613 break;
1615 /* fallthrough if changed, since cache needs to be rebuilt */ 1614 /* fallthrough if changed, since cache needs to be rebuilt */
1616 case 7: 1615 case 7: