From 832352856974ce64f442ea54cdacc01330db298b Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 24 Jun 2007 00:17:28 +0000 Subject: [PATCH] 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 --- apps/menus/display_menu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c index 60b06d7f4..5114feafb 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; -- 2.11.4.GIT