summaryrefslogtreecommitdiff
path: root/apps/radio/radio_skin.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-01-13 10:56:23 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-01-13 10:56:23 +0000
commit605e2d0e90b335897cc1e29c575a27dabc778491 (patch)
tree55cb67f5e7abc0fe1f5d62090ffda4abb4948959 /apps/radio/radio_skin.c
parentded64f1db58e15bb310da2c685afed6b3dbce4b5 (diff)
downloadrockbox-605e2d0e90b335897cc1e29c575a27dabc778491.tar.gz
rockbox-605e2d0e90b335897cc1e29c575a27dabc778491.zip
New Touchscreen region type... 'mute' which un/mutes volume without pausing playback
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29046 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/radio/radio_skin.c')
-rw-r--r--apps/radio/radio_skin.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/radio/radio_skin.c b/apps/radio/radio_skin.c
index 68314d62b5..2e329230f7 100644
--- a/apps/radio/radio_skin.c
+++ b/apps/radio/radio_skin.c
@@ -32,6 +32,10 @@
32#include "appevents.h" 32#include "appevents.h"
33#include "statusbar-skinned.h" 33#include "statusbar-skinned.h"
34#include "option_select.h" 34#include "option_select.h"
35#ifdef HAVE_TOUCHSCREEN
36#include "sound.h"
37#include "misc.h"
38#endif
35 39
36 40
37char* default_radio_skin(enum screen_type screen) 41char* default_radio_skin(enum screen_type screen)
@@ -120,10 +124,23 @@ int fms_do_button_loop(bool update_screen)
120 case ACTION_SETTINGS_INC: 124 case ACTION_SETTINGS_INC:
121 case ACTION_SETTINGS_DEC: 125 case ACTION_SETTINGS_DEC:
122 { 126 {
123 const struct settings_list *setting = region->extradata; 127 const struct settings_list *setting = region->data;
124 option_select_next_val(setting, button == ACTION_SETTINGS_DEC, true); 128 option_select_next_val(setting, button == ACTION_SETTINGS_DEC, true);
125 } 129 }
126 return ACTION_REDRAW; 130 return ACTION_REDRAW;
131 case ACTION_TOUCH_MUTE:
132 {
133 const int min_vol = sound_min(SOUND_VOLUME);
134 if (global_settings.volume == min_vol)
135 global_settings.volume = region->value;
136 else
137 {
138 region->value = global_settings.volume;
139 global_settings.volume = min_vol;
140 }
141 setvol();
142 }
143 return ACTION_REDRAW;
127 } 144 }
128#endif 145#endif
129 return button; 146 return button;