summaryrefslogtreecommitdiffstats
path: root/apps/menus/display_menu.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2007-06-24 00:17:28 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2007-06-24 00:17:28 +0000
commit845b8da451ec5a27ac267ff2301c2516f28449b7 (patch)
treef1de61c71ceb1dce12a25402db4d0d6ae364f2a9 /apps/menus/display_menu.c
parentdf437152e2a56f2c6e2932a311a475cbbcb15a96 (diff)
downloadrockbox-845b8da451ec5a27ac267ff2301c2516f28449b7.tar.gz
rockbox-845b8da451ec5a27ac267ff2301c2516f28449b7.tar.bz2
rockbox-845b8da451ec5a27ac267ff2301c2516f28449b7.zip
Limit minimum db scale value when switching from linear to logaritmic peakmeter scale. Fixes FS #7325
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13696 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/display_menu.c')
-rw-r--r--apps/menus/display_menu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 60b06d7f4f..5114feafb0 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -427,6 +427,10 @@ static int peak_meter_scale(void) {
/* we only store -dBfs */
global_settings.peak_meter_min = -peak_meter_get_min() / 100;
global_settings.peak_meter_max = -peak_meter_get_max() / 100;
+
+ /* limit the returned value to the allowed range */
+ if(global_settings.peak_meter_min > 89)
+ global_settings.peak_meter_min = 89;
} else {
int max;