diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c index 719e5513b6..edb1a7b1a2 100644 --- a/apps/gui/skin_engine/skin_touchsupport.c +++ b/apps/gui/skin_engine/skin_touchsupport.c @@ -203,6 +203,19 @@ int skin_get_touchaction(struct gui_wps *gwps, int* edge_offset) action = ACTION_TOUCH_SCROLLBAR_END; break; + case ACTION_TOUCH_VOLUME: + { + const int min_vol = sound_min(SOUND_VOLUME); + const int max_vol = sound_max(SOUND_VOLUME); + const int step_vol = sound_steps(SOUND_VOLUME); + + global_status.volume = from_normalized_volume(*edge_offset, min_vol, max_vol, 1000); + global_status.volume -= (global_status.volume % step_vol); + setvol(); + + action = ACTION_TOUCHSCREEN; + } break; + case ACTION_TOUCH_SOFTLOCK: data->touchscreen_locked = !data->touchscreen_locked; action = ACTION_NONE; diff --git a/apps/gui/wps.c b/apps/gui/wps.c index c39d8afc4c..4e3fd2d6cb 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -205,17 +205,6 @@ static int skintouch_to_wps(void) audio_pre_ff_rewind(); audio_ff_rewind(gstate->id3->elapsed); return ACTION_TOUCHSCREEN; - case ACTION_TOUCH_VOLUME: - { - const int min_vol = sound_min(SOUND_VOLUME); - const int max_vol = sound_max(SOUND_VOLUME); - const int step_vol = sound_steps(SOUND_VOLUME); - - global_status.volume = from_normalized_volume(offset, min_vol, max_vol, 1000); - global_status.volume -= (global_status.volume % step_vol); - setvol(); - } - return ACTION_TOUCHSCREEN; } return button; }