mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
sound: update global volume state in sound_set_volume()
Instead of calling sound_set_volume() and then manually setting global_status.volume to match, update the global volume state directly in sound_set_volume(). This makes things a bit simpler and less error-prone. Change-Id: I4db4d60ae1a72bd051ef49c90b1ae7f5ba59e535
This commit is contained in:
parent
ae001cb60c
commit
b19b95c00f
10 changed files with 7 additions and 18 deletions
|
@ -877,9 +877,8 @@ void setvol(void)
|
|||
volume = max_vol;
|
||||
if (volume > global_settings.volume_limit)
|
||||
volume = global_settings.volume_limit;
|
||||
global_status.volume = volume;
|
||||
|
||||
sound_set_volume(volume);
|
||||
global_status.last_volume_change = current_tick;
|
||||
status_save(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue