1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andrew Mahone 2009-01-17 10:58:21 +00:00
parent 6b32a2d9cd
commit 44ab8a63ea

View file

@ -203,10 +203,10 @@ static int slide_spacing = (LCD_WIDTH - DISPLAY_WIDTH) / 8;
static int center_margin = (LCD_WIDTH - DISPLAY_WIDTH) / 16; static int center_margin = (LCD_WIDTH - DISPLAY_WIDTH) / 16;
static int num_slides = 4; static int num_slides = 4;
static int zoom = 100; static int zoom = 100;
static bool show_fps = false; static int show_fps = false;
static bool resize = true; static int resize = true;
static int cache_version = 0; static int cache_version = 0;
static enum show_album_name_values show_album_name = album_name_top; static int show_album_name = album_name_top;
static struct configdata config[] = static struct configdata config[] =
{ {
@ -214,10 +214,10 @@ static struct configdata config[] =
{ TYPE_INT, 0, MAX_MARGIN, &center_margin, "center margin", NULL, NULL }, { TYPE_INT, 0, MAX_MARGIN, &center_margin, "center margin", NULL, NULL },
{ TYPE_INT, 0, MAX_SLIDES_COUNT, &num_slides, "slides count", NULL, NULL }, { TYPE_INT, 0, MAX_SLIDES_COUNT, &num_slides, "slides count", NULL, NULL },
{ TYPE_INT, 0, 300, &zoom, "zoom", NULL, NULL }, { TYPE_INT, 0, 300, &zoom, "zoom", NULL, NULL },
{ TYPE_INT, 0, 1, (int *)&show_fps, "show fps", NULL, NULL }, { TYPE_INT, 0, 1, &show_fps, "show fps", NULL, NULL },
{ TYPE_INT, 0, 1, (int *)&resize, "resize", NULL, NULL }, { TYPE_INT, 0, 1, &resize, "resize", NULL, NULL },
{ TYPE_INT, 0, 100, &cache_version, "cache version", NULL, NULL }, { TYPE_INT, 0, 100, &cache_version, "cache version", NULL, NULL },
{ TYPE_ENUM, 0, 2, (int *)&show_album_name, "show album name", { TYPE_ENUM, 0, 2, &show_album_name, "show album name",
show_album_name_conf, NULL } show_album_name_conf, NULL }
}; };
@ -1555,6 +1555,7 @@ int settings_menu(void)
{ {
int selection = 0; int selection = 0;
bool old_val; bool old_val;
bool new_val;
MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS",
"Spacing", "Center margin", "Number of slides", "Zoom", "Spacing", "Center margin", "Number of slides", "Zoom",
@ -1564,7 +1565,9 @@ int settings_menu(void)
selection=rb->do_menu(&settings_menu,&selection, NULL, false); selection=rb->do_menu(&settings_menu,&selection, NULL, false);
switch(selection) { switch(selection) {
case 0: case 0:
rb->set_bool("Show FPS", &(show_fps)); new_val = show_fps;
rb->set_bool("Show FPS", &new_val);
show_fps = new_val;
reset_track_list(); reset_track_list();
break; break;
@ -1604,9 +1607,10 @@ int settings_menu(void)
reset_slides(); reset_slides();
break; break;
case 6: case 6:
old_val = resize; old_val = new_val = resize;
rb->set_bool("Resize Covers", &resize); rb->set_bool("Resize Covers", &new_val);
if (old_val == resize) /* changed? */ resize = new_val;
if (old_val == new_val) /* changed? */
break; break;
/* fallthrough if changed, since cache needs to be rebuilt */ /* fallthrough if changed, since cache needs to be rebuilt */
case 7: case 7: