From 6a1161b634e43225ae12bf669ad3bbe1ea1edab0 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 6 Nov 2006 10:11:51 +0000 Subject: dont allow the volume setting to wrap git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11445 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apps/settings.c') 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, bool done = false; struct gui_synclist lists; int oldvalue; + bool allow_wrap = true; if (cb_data->type == INT) - oldvalue = *(int*)variable; + { + oldvalue = *(int*)variable; + if (variable == &global_settings.volume) + allow_wrap = false; + } else oldvalue = *(bool*)variable; 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, action = get_action(CONTEXT_LIST,TIMEOUT_BLOCK); if (action == ACTION_NONE) continue; - - if (gui_synclist_do_button(&lists,action)) + if (gui_synclist_do_button(&lists,action, + allow_wrap?LIST_WRAP_UNLESS_HELD:LIST_WRAP_OFF)) { if (global_settings.talk_menu) { -- cgit v1.2.3