diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-10-15 12:34:43 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-10-15 12:34:43 +0000 |
commit | 52040a05a24bef3889ef01729280416923663697 (patch) | |
tree | b385d8c8bb58ac3449bffe41bca098173c00e872 /apps | |
parent | 0f7f3467bfcac6091106d2927c3728952d710615 (diff) | |
download | rockbox-52040a05a24bef3889ef01729280416923663697.tar.gz rockbox-52040a05a24bef3889ef01729280416923663697.zip |
fix the wrong value being selected initially
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15121 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/option_select.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 6092a63da6..4f446fc8de 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -352,7 +352,11 @@ bool option_screen(struct settings_list *setting, int min = sound_min(setting_id); int max = sound_max(setting_id); nb_items = (max-min)/steps + 1; +#ifndef ASCENDING_INT_SETTINGS selected = (max - oldvalue) / steps; +#else + selected = (oldvalue - min) / steps; +#endif function = sound_get_fn(setting_id); } else @@ -363,7 +367,11 @@ bool option_screen(struct settings_list *setting, min = info->min; step = info->step; nb_items = (max-min)/step + 1; - selected = (max - oldvalue)/step; +#ifndef ASCENDING_INT_SETTINGS + selected = (max - oldvalue) / step; +#else + selected = (oldvalue - min) / step; +#endif function = info->option_callback; } } |