mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 10:07:38 -04:00
sound: fix volume change being reported to %mv tag on boot
Setting the last_volume_change time was moved here in commit 2e08b0f82e ("sound: update global volume state in sound_set_volume()"); however this also triggers the %mv tag on boot, as if the user was actively changing the volume. Move the last_volume_change update back to the original call sites to fix this. Change-Id: I895112cea4315f194f67c27839f1082d67c1ffa9
This commit is contained in:
parent
b19b95c00f
commit
e24deccd00
3 changed files with 4 additions and 1 deletions
|
@ -594,6 +594,9 @@ bool option_screen(const struct settings_list *setting,
|
|||
if (!cb_on_changed || (*variable != oldvalue))
|
||||
{
|
||||
function(*variable);
|
||||
/* if the volume is changing we need to let the skins know */
|
||||
if (function == sound_get_fn(SOUND_VOLUME))
|
||||
global_status.last_volume_change = current_tick;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -879,6 +879,7 @@ void setvol(void)
|
|||
volume = global_settings.volume_limit;
|
||||
|
||||
sound_set_volume(volume);
|
||||
global_status.last_volume_change = current_tick;
|
||||
status_save(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -318,7 +318,6 @@ void sound_set_volume(int value)
|
|||
|
||||
#ifndef BOOTLOADER
|
||||
global_status.volume = value;
|
||||
global_status.last_volume_change = current_tick;
|
||||
#endif
|
||||
|
||||
#if defined(AUDIOHW_HAVE_CLIPPING)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue