Fix FS #8514 (remote peakmeter issue) by separating the peak release times for the screens. Thanks to amiconn for pointing in the right direction.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16234 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2008-02-06 21:53:07 +00:00
parent c789f3a8a2
commit 0ecdb37e99

View file

@ -939,7 +939,12 @@ static void peak_meter_draw(struct screen *display, struct meter_scales *scales,
int left = 0, right = 0;
int meterwidth = width - 3;
int i, delta;
#if defined(HAVE_REMOTE_LCD) && !defined (ROCKBOX_HAS_LOGF)
static long peak_release_tick[2] = {0,0};
int screen_nr = display->screen_type == SCREEN_MAIN ? 0 : 1;
#else
static long peak_release_tick = 0;
#endif
#ifdef PM_DEBUG
static long pm_tick = 0;
@ -994,8 +999,13 @@ static void peak_meter_draw(struct screen *display, struct meter_scales *scales,
}
/* apply release */
#if defined(HAVE_REMOTE_LCD) && !defined (ROCKBOX_HAS_LOGF)
delta = current_tick - peak_release_tick[screen_nr];
peak_release_tick[screen_nr] = current_tick;
#else
delta = current_tick - peak_release_tick;
peak_release_tick = current_tick;
#endif
left = MAX(left , scales->last_left - delta * pm_peak_release);
right = MAX(right, scales->last_right - delta * pm_peak_release);