diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-02-24 12:44:39 +0100 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-03-03 22:37:14 +0000 |
commit | cde5ae755fde5b645ab287a91c613f803a88d79d (patch) | |
tree | 808bda47448ea72e52a335e87e15101083da6b72 | |
parent | 0f439bee9914999f4d63f7677f0604c3ecd8242b (diff) | |
download | rockbox-cde5ae755fde5b645ab287a91c613f803a88d79d.tar.gz rockbox-cde5ae755fde5b645ab287a91c613f803a88d79d.zip |
iPods: Allow using scroll wheel to change volume on QuickScreen
As suggested by forum user yuuiko
Change-Id: Ifb989f9513a9e3c59e4ab0f38c0a8e2675c68dd8
-rw-r--r-- | apps/action.h | 2 | ||||
-rw-r--r-- | apps/gui/quickscreen.c | 10 | ||||
-rw-r--r-- | apps/keymaps/keymap-ipod.c | 4 | ||||
-rw-r--r-- | manual/main_menu/main.tex | 6 |
4 files changed, 21 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 { | |||
245 | ACTION_QS_RIGHT, | 245 | ACTION_QS_RIGHT, |
246 | ACTION_QS_DOWN, | 246 | ACTION_QS_DOWN, |
247 | ACTION_QS_TOP, | 247 | ACTION_QS_TOP, |
248 | ACTION_QS_VOLUP, | ||
249 | ACTION_QS_VOLDOWN, | ||
248 | 250 | ||
249 | /* pitchscreen */ | 251 | /* pitchscreen */ |
250 | /* obviously ignore if you dont have thise screen */ | 252 | /* 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 @@ | |||
26 | #include "font.h" | 26 | #include "font.h" |
27 | #include "kernel.h" | 27 | #include "kernel.h" |
28 | #include "misc.h" | 28 | #include "misc.h" |
29 | #include "sound.h" | ||
29 | #include "action.h" | 30 | #include "action.h" |
30 | #include "settings_list.h" | 31 | #include "settings_list.h" |
31 | #include "lang.h" | 32 | #include "lang.h" |
@@ -361,7 +362,14 @@ static bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_ente | |||
361 | } | 362 | } |
362 | else if (button == button_enter) | 363 | else if (button == button_enter) |
363 | can_quit = true; | 364 | can_quit = true; |
364 | 365 | else if (button == ACTION_QS_VOLUP) { | |
366 | global_settings.volume += sound_steps(SOUND_VOLUME); | ||
367 | setvol(); | ||
368 | } | ||
369 | else if (button == ACTION_QS_VOLDOWN) { | ||
370 | global_settings.volume -= sound_steps(SOUND_VOLUME); | ||
371 | setvol(); | ||
372 | } | ||
365 | if ((button == button_enter) && can_quit) | 373 | if ((button == button_enter) && can_quit) |
366 | break; | 374 | break; |
367 | 375 | ||
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[] = { | |||
132 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, | 132 | { ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE }, |
133 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, | 133 | { ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE }, |
134 | { ACTION_STD_CANCEL, BUTTON_SELECT, BUTTON_NONE }, | 134 | { ACTION_STD_CANCEL, BUTTON_SELECT, BUTTON_NONE }, |
135 | { ACTION_QS_VOLDOWN, BUTTON_SCROLL_BACK, BUTTON_NONE }, | ||
136 | { ACTION_QS_VOLDOWN, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE }, | ||
137 | { ACTION_QS_VOLUP, BUTTON_SCROLL_FWD, BUTTON_NONE }, | ||
138 | { ACTION_QS_VOLUP, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE }, | ||
135 | 139 | ||
136 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) | 140 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD) |
137 | }; /* button_context_quickscreen */ | 141 | }; /* button_context_quickscreen */ |
diff --git a/manual/main_menu/main.tex b/manual/main_menu/main.tex index 9ddd4bbe93..31d1589182 100644 --- a/manual/main_menu/main.tex +++ b/manual/main_menu/main.tex | |||
@@ -250,6 +250,12 @@ utilities. A detailed description of the different plugins is to be found in | |||
250 | Therefore if you select the same setting at e.g. the top and bottom of the | 250 | Therefore if you select the same setting at e.g. the top and bottom of the |
251 | quickscreen, then pressing up and down will cycle through this setting in | 251 | quickscreen, then pressing up and down will cycle through this setting in |
252 | opposite directions. | 252 | opposite directions. |
253 | |||
254 | \opt{ipod}{ | ||
255 | \note{You can always adjust the sound volume on the QuickScreen. | ||
256 | To do so, slide your finger around the click wheel as you would on the | ||
257 | While Playing Screen.} | ||
258 | } | ||
253 | } | 259 | } |
254 | 260 | ||
255 | \section{\label{ref:MainMenuShortcuts}Shortcuts} | 261 | \section{\label{ref:MainMenuShortcuts}Shortcuts} |