summaryrefslogtreecommitdiffstats
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.tar.bz2
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 @@
#include "appevents.h"
#include "statusbar-skinned.h"
#include "option_select.h"
+#ifdef HAVE_TOUCHSCREEN
+#include "sound.h"
+#include "misc.h"
+#endif
char* default_radio_skin(enum screen_type screen)
@@ -120,10 +124,23 @@ int fms_do_button_loop(bool update_screen)
case ACTION_SETTINGS_INC:
case ACTION_SETTINGS_DEC:
{
- const struct settings_list *setting = region->extradata;
+ const struct settings_list *setting = region->data;
option_select_next_val(setting, button == ACTION_SETTINGS_DEC, true);
}
return ACTION_REDRAW;
+ case ACTION_TOUCH_MUTE:
+ {
+ const int min_vol = sound_min(SOUND_VOLUME);
+ if (global_settings.volume == min_vol)
+ global_settings.volume = region->value;
+ else
+ {
+ region->value = global_settings.volume;
+ global_settings.volume = min_vol;
+ }
+ setvol();
+ }
+ return ACTION_REDRAW;
}
#endif
return button;