summaryrefslogtreecommitdiff
path: root/apps/settings.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-11-06 10:11:51 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-11-06 10:11:51 +0000
commit6a1161b634e43225ae12bf669ad3bbe1ea1edab0 (patch)
tree57a5b054cca637e51263077e8405bb83c62d53e2 /apps/settings.c
parent2f444aac2910cebeed988ea22d442456a4729ea4 (diff)
downloadrockbox-6a1161b634e43225ae12bf669ad3bbe1ea1edab0.tar.gz
rockbox-6a1161b634e43225ae12bf669ad3bbe1ea1edab0.zip
dont allow the volume setting to wrap
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11445 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r--apps/settings.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/settings.c b/apps/settings.c
index da5a461d7d..a4320eda7b 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -1982,9 +1982,14 @@ bool do_set_setting(const unsigned char* string, void *variable,
1982 bool done = false; 1982 bool done = false;
1983 struct gui_synclist lists; 1983 struct gui_synclist lists;
1984 int oldvalue; 1984 int oldvalue;
1985 bool allow_wrap = true;
1985 1986
1986 if (cb_data->type == INT) 1987 if (cb_data->type == INT)
1987 oldvalue = *(int*)variable; 1988 {
1989 oldvalue = *(int*)variable;
1990 if (variable == &global_settings.volume)
1991 allow_wrap = false;
1992 }
1988 else oldvalue = *(bool*)variable; 1993 else oldvalue = *(bool*)variable;
1989 1994
1990 gui_synclist_init(&lists,value_setting_get_name_cb,(void*)cb_data,false,1); 1995 gui_synclist_init(&lists,value_setting_get_name_cb,(void*)cb_data,false,1);
@@ -2008,8 +2013,8 @@ bool do_set_setting(const unsigned char* string, void *variable,
2008 action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); 2013 action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK);
2009 if (action == ACTION_NONE) 2014 if (action == ACTION_NONE)
2010 continue; 2015 continue;
2011 2016 if (gui_synclist_do_button(&lists,action,
2012 if (gui_synclist_do_button(&lists,action)) 2017 allow_wrap?LIST_WRAP_UNLESS_HELD:LIST_WRAP_OFF))
2013 { 2018 {
2014 if (global_settings.talk_menu) 2019 if (global_settings.talk_menu)
2015 { 2020 {