summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-02-24 12:44:39 +0100
committerSolomon Peachy <pizza@shaftnet.org>2021-03-03 22:37:14 +0000
commitcde5ae755fde5b645ab287a91c613f803a88d79d (patch)
tree808bda47448ea72e52a335e87e15101083da6b72 /apps
parent0f439bee9914999f4d63f7677f0604c3ecd8242b (diff)
downloadrockbox-cde5ae755fde5b645ab287a91c613f803a88d79d.tar.gz
rockbox-cde5ae755fde5b645ab287a91c613f803a88d79d.tar.bz2
rockbox-cde5ae755fde5b645ab287a91c613f803a88d79d.zip
iPods: Allow using scroll wheel to change volume on QuickScreen
As suggested by forum user yuuiko Change-Id: Ifb989f9513a9e3c59e4ab0f38c0a8e2675c68dd8
Diffstat (limited to 'apps')
-rw-r--r--apps/action.h2
-rw-r--r--apps/gui/quickscreen.c10
-rw-r--r--apps/keymaps/keymap-ipod.c4
3 files changed, 15 insertions, 1 deletions
diff --git a/apps/action.h b/apps/action.h
index 3f0d593d6a..b434a38470 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -245,6 +245,8 @@ enum {
ACTION_QS_RIGHT,
ACTION_QS_DOWN,
ACTION_QS_TOP,
+ ACTION_QS_VOLUP,
+ ACTION_QS_VOLDOWN,
/* pitchscreen */
/* obviously ignore if you dont have thise screen */
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 2ce09ae474..b5113df8f6 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -26,6 +26,7 @@
#include "font.h"
#include "kernel.h"
#include "misc.h"
+#include "sound.h"
#include "action.h"
#include "settings_list.h"
#include "lang.h"
@@ -361,7 +362,14 @@ static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_ente
}
else if (button == button_enter)
can_quit = true;
-
+ else if (button == ACTION_QS_VOLUP) {
+ global_settings.volume += sound_steps(SOUND_VOLUME);
+ setvol();
+ }
+ else if (button == ACTION_QS_VOLDOWN) {
+ global_settings.volume -= sound_steps(SOUND_VOLUME);
+ setvol();
+ }
if ((button == button_enter) && can_quit)
break;
diff --git a/apps/keymaps/keymap-ipod.c b/apps/keymaps/keymap-ipod.c
index a438926dd9..ca52b6b216 100644
--- a/apps/keymaps/keymap-ipod.c
+++ b/apps/keymaps/keymap-ipod.c
@@ -132,6 +132,10 @@ static const struct button_mapping button_context_quickscreen[] = {
{ ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
{ ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_SELECT, BUTTON_NONE },
+ { ACTION_QS_VOLDOWN, BUTTON_SCROLL_BACK, BUTTON_NONE },
+ { ACTION_QS_VOLDOWN, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE },
+ { ACTION_QS_VOLUP, BUTTON_SCROLL_FWD, BUTTON_NONE },
+ { ACTION_QS_VOLUP, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_quickscreen */