forked from len0rd/rockbox
Fix FS #9128: invalidate the peakmeter scales when switching between playback and recording. This causes them to be recalculated so they show up correctly when playback and recording use different viewport sizes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17869 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1ed2e514da
commit
05cb42164b
1 changed files with 7 additions and 1 deletions
|
@ -535,6 +535,7 @@ void pm_reset_clipcount(void)
|
||||||
*/
|
*/
|
||||||
void peak_meter_playback(bool playback)
|
void peak_meter_playback(bool playback)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
#ifdef SIMULATOR
|
#ifdef SIMULATOR
|
||||||
(void)playback;
|
(void)playback;
|
||||||
#elif CONFIG_CODEC == SWCODEC
|
#elif CONFIG_CODEC == SWCODEC
|
||||||
|
@ -548,6 +549,11 @@ void peak_meter_playback(bool playback)
|
||||||
pm_src_right = MAS_REG_QPEAK_R;
|
pm_src_right = MAS_REG_QPEAK_R;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* reset the scales just in case recording and playback
|
||||||
|
use different viewport sizes. Normally we should be checking viewport
|
||||||
|
sizes every time but this will do for now */
|
||||||
|
FOR_NB_SCREENS(i)
|
||||||
|
scales[i].db_scale_valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_RECORDING
|
#ifdef HAVE_RECORDING
|
||||||
|
@ -1075,7 +1081,7 @@ static void peak_meter_draw(struct screen *display, struct meter_scales *scales,
|
||||||
display->drawpixel(x + scales->db_scale_lcd_coord[i],
|
display->drawpixel(x + scales->db_scale_lcd_coord[i],
|
||||||
y + height / 2 - 1);
|
y + height / 2 - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_RECORDING
|
#ifdef HAVE_RECORDING
|
||||||
|
|
||||||
#ifdef HAVE_BACKLIGHT
|
#ifdef HAVE_BACKLIGHT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue