summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-01-17 10:58:21 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-01-17 10:58:21 +0000
commit44ab8a63eae8d205cb4f46da3e50abbc9b7b531e (patch)
treecb24eda86391722f8a91094b58485bea6089b0f3
parent6b32a2d9cd7e4c1828fd8cf76eb7e340c2951844 (diff)
downloadrockbox-44ab8a63eae8d205cb4f46da3e50abbc9b7b531e.tar.gz
rockbox-44ab8a63eae8d205cb4f46da3e50abbc9b7b531e.zip
fix yellow, but in the long run, configfile needs a TYPE_BOOL as a clean fix to this
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19783 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/pictureflow.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index b6c63c4561..bbd7694b7c 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -203,10 +203,10 @@ 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 bool show_fps = false; 206static int show_fps = false;
207static bool resize = true; 207static int resize = true;
208static int cache_version = 0; 208static int cache_version = 0;
209static enum show_album_name_values 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{
@@ -214,10 +214,10 @@ static struct configdata config[] =
214 { TYPE_INT, 0, MAX_MARGIN, &center_margin, "center margin", NULL, NULL }, 214 { TYPE_INT, 0, MAX_MARGIN, &center_margin, "center margin", NULL, NULL },
215 { TYPE_INT, 0, MAX_SLIDES_COUNT, &num_slides, "slides count", NULL, NULL }, 215 { TYPE_INT, 0, MAX_SLIDES_COUNT, &num_slides, "slides count", NULL, NULL },
216 { TYPE_INT, 0, 300, &zoom, "zoom", NULL, NULL }, 216 { TYPE_INT, 0, 300, &zoom, "zoom", NULL, NULL },
217 { TYPE_INT, 0, 1, (int *)&show_fps, "show fps", NULL, NULL }, 217 { TYPE_INT, 0, 1, &show_fps, "show fps", NULL, NULL },
218 { TYPE_INT, 0, 1, (int *)&resize, "resize", NULL, NULL }, 218 { TYPE_INT, 0, 1, &resize, "resize", NULL, NULL },
219 { TYPE_INT, 0, 100, &cache_version, "cache version", NULL, NULL }, 219 { TYPE_INT, 0, 100, &cache_version, "cache version", NULL, NULL },
220 { TYPE_ENUM, 0, 2, (int *)&show_album_name, "show album name", 220 { TYPE_ENUM, 0, 2, &show_album_name, "show album name",
221 show_album_name_conf, NULL } 221 show_album_name_conf, NULL }
222}; 222};
223 223
@@ -1555,6 +1555,7 @@ int settings_menu(void)
1555{ 1555{
1556 int selection = 0; 1556 int selection = 0;
1557 bool old_val; 1557 bool old_val;
1558 bool new_val;
1558 1559
1559 MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", 1560 MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS",
1560 "Spacing", "Center margin", "Number of slides", "Zoom", 1561 "Spacing", "Center margin", "Number of slides", "Zoom",
@@ -1564,7 +1565,9 @@ int settings_menu(void)
1564 selection=rb->do_menu(&settings_menu,&selection, NULL, false); 1565 selection=rb->do_menu(&settings_menu,&selection, NULL, false);
1565 switch(selection) { 1566 switch(selection) {
1566 case 0: 1567 case 0:
1567 rb->set_bool("Show FPS", &(show_fps)); 1568 new_val = show_fps;
1569 rb->set_bool("Show FPS", &new_val);
1570 show_fps = new_val;
1568 reset_track_list(); 1571 reset_track_list();
1569 break; 1572 break;
1570 1573
@@ -1604,9 +1607,10 @@ int settings_menu(void)
1604 reset_slides(); 1607 reset_slides();
1605 break; 1608 break;
1606 case 6: 1609 case 6:
1607 old_val = resize; 1610 old_val = new_val = resize;
1608 rb->set_bool("Resize Covers", &resize); 1611 rb->set_bool("Resize Covers", &new_val);
1609 if (old_val == resize) /* changed? */ 1612 resize = new_val;
1613 if (old_val == new_val) /* changed? */
1610 break; 1614 break;
1611 /* fallthrough if changed, since cache needs to be rebuilt */ 1615 /* fallthrough if changed, since cache needs to be rebuilt */
1612 case 7: 1616 case 7: