summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-07-23 17:11:13 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-07-23 17:11:13 +0000
commit34a6c4748c25ef83cc4c2ff5aab9bda62e2814e1 (patch)
tree74dd07c475d440e0d7728c0b0fbf508e2f6be58d /apps/gui/gwps-common.c
parentbc678878c9b93a3d483762f3af5f3828230e4a59 (diff)
Fix FS#7441: Volume wasn't mapped correctly to the enum cases when using the %?pv WPS tag.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13967 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 91f60d7d14..e5f0e882e8 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -842,9 +842,8 @@ static char *get_token_value(struct gui_wps *gwps,
else
{
*intval = (limit - 3) * (global_settings.volume
- - sound_min(SOUND_VOLUME))
- / (sound_max(SOUND_VOLUME)
- - sound_min(SOUND_VOLUME)) + 2;
+ - sound_min(SOUND_VOLUME) - 1)
+ / (-1 - sound_min(SOUND_VOLUME)) + 2;
}
}
return buf;