mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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
This commit is contained in:
parent
ded64f1db5
commit
605e2d0e90
7 changed files with 66 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue