diff options
author | Johannes Rauh <johnbthetenth@gmail.com> | 2018-06-23 11:27:18 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-29 20:08:50 -0400 |
commit | 44023eb4304e5a70d741fd8accb72feed4613661 (patch) | |
tree | 9cfa84adbe84f4b233ea07ee6a3d0995f832d423 | |
parent | f1bfbb52f1bc4f3afd12493c8e8b03317ae4058f (diff) | |
download | rockbox-44023eb4304e5a70d741fd8accb72feed4613661.tar.gz rockbox-44023eb4304e5a70d741fd8accb72feed4613661.zip |
Volume adjustment in LISTS ignored AUDIOHW_SETTING values
AUDIOHW_SETTING() defines number of decimals and step size.
This is taken into account in sound menu but ignored in lists
(had been recently fixed in WPS).
This was not a problem so far since all drivers used 0 decimal
places and step size equal 1.
Change-Id: I8807d5b6f2f3d412a2bc5769905bd776553ece0b
-rw-r--r-- | apps/gui/list.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index ee4684233f..29145eb3ca 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -682,10 +682,11 @@ bool gui_synclist_do_button(struct gui_synclist * lists, | |||
682 | 682 | ||
683 | #ifdef HAVE_VOLUME_IN_LIST | 683 | #ifdef HAVE_VOLUME_IN_LIST |
684 | case ACTION_LIST_VOLUP: | 684 | case ACTION_LIST_VOLUP: |
685 | global_settings.volume += 2; | 685 | global_settings.volume += sound_steps(SOUND_VOLUME); |
686 | /* up two because the falthrough brings it down one */ | 686 | setvol(); |
687 | return true; | ||
687 | case ACTION_LIST_VOLDOWN: | 688 | case ACTION_LIST_VOLDOWN: |
688 | global_settings.volume--; | 689 | global_settings.volume -= sound_steps(SOUND_VOLUME); |
689 | setvol(); | 690 | setvol(); |
690 | return true; | 691 | return true; |
691 | #endif | 692 | #endif |