diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-12-18 21:13:15 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2022-12-29 04:39:22 +0100 |
commit | faa2cb99429214de745bbc3e64e48a7432db51ae (patch) | |
tree | de2967e0e8237cb86422cd82488e110b97ff831e /apps/plugins/bounce.c | |
parent | 52f59f637dfcb24900b30ed52c1d7725eab93364 (diff) | |
download | rockbox-faa2cb99429214de745bbc3e64e48a7432db51ae.tar.gz rockbox-faa2cb99429214de745bbc3e64e48a7432db51ae.zip |
plugins: Improve usability of iPod keymaps
- Reduce need to press multiple buttons at
the same time to quit a plugin
- Have "Menu" be default way to quit plugins or
to access plugin menu
- Fall back to (Long) "Select" or Long "Menu"
in cases where Menu button isn't available
(e.g. in ImageViewer and many games)
out of scope:
boomshine, lua_scripts, Rockpaint,
Doom, Duke3D, Pacbox, Quake,
Sgt-Puzzles, Wolf3D, XWorld,
Minesweeper, Pixel Painter, Spacerocks
Change-Id: I6d4dc7174695fe4b8ee9cbaccb21bdbfe6af5c48
Diffstat (limited to 'apps/plugins/bounce.c')
-rw-r--r-- | apps/plugins/bounce.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index e6f29817d6..a42a0af6ba 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c | |||
@@ -34,10 +34,6 @@ | |||
34 | static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | 34 | static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; |
35 | 35 | ||
36 | /* We set button maping with PLA */ | 36 | /* We set button maping with PLA */ |
37 | #define BOUNCE_UP PLA_UP | ||
38 | #define BOUNCE_UP_REPEAT PLA_UP_REPEAT | ||
39 | #define BOUNCE_DOWN PLA_DOWN | ||
40 | #define BOUNCE_DOWN_REPEAT PLA_DOWN_REPEAT | ||
41 | 37 | ||
42 | #ifdef HAVE_SCROLLWHEEL | 38 | #ifdef HAVE_SCROLLWHEEL |
43 | #define BOUNCE_LEFT PLA_SCROLL_BACK | 39 | #define BOUNCE_LEFT PLA_SCROLL_BACK |
@@ -52,7 +48,22 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | |||
52 | #endif | 48 | #endif |
53 | 49 | ||
54 | #define BOUNCE_QUIT PLA_EXIT | 50 | #define BOUNCE_QUIT PLA_EXIT |
51 | |||
52 | #if (CONFIG_KEYPAD == IPOD_1G2G_PAD) \ | ||
53 | || (CONFIG_KEYPAD == IPOD_3G_PAD) \ | ||
54 | || (CONFIG_KEYPAD == IPOD_4G_PAD) | ||
55 | #define BOUNCE_QUIT2 PLA_UP | ||
56 | #define BOUNCE_DOWN PLA_LEFT | ||
57 | #define BOUNCE_DOWN_REPEAT PLA_LEFT_REPEAT | ||
58 | #define BOUNCE_UP PLA_RIGHT | ||
59 | #define BOUNCE_UP_REPEAT PLA_RIGHT_REPEAT | ||
60 | #else | ||
55 | #define BOUNCE_QUIT2 PLA_CANCEL | 61 | #define BOUNCE_QUIT2 PLA_CANCEL |
62 | #define BOUNCE_DOWN PLA_DOWN | ||
63 | #define BOUNCE_DOWN_REPEAT PLA_DOWN_REPEAT | ||
64 | #define BOUNCE_UP PLA_UP | ||
65 | #define BOUNCE_UP_REPEAT PLA_UP_REPEAT | ||
66 | #endif | ||
56 | #define BOUNCE_MODE PLA_SELECT | 67 | #define BOUNCE_MODE PLA_SELECT |
57 | 68 | ||
58 | #define LETTER_WIDTH 11 | 69 | #define LETTER_WIDTH 11 |
@@ -471,6 +482,10 @@ enum plugin_status plugin_start(const void* parameter) | |||
471 | #if (CONFIG_KEYPAD == SAMSUNG_YH92X_PAD) || \ | 482 | #if (CONFIG_KEYPAD == SAMSUNG_YH92X_PAD) || \ |
472 | (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) | 483 | (CONFIG_KEYPAD == SAMSUNG_YH820_PAD) |
473 | "[Rew] to stop"; | 484 | "[Rew] to stop"; |
485 | #elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \ | ||
486 | || (CONFIG_KEYPAD == IPOD_3G_PAD) \ | ||
487 | || (CONFIG_KEYPAD == IPOD_4G_PAD) | ||
488 | "[Menu] to stop"; | ||
474 | #else | 489 | #else |
475 | "[Off] to stop"; | 490 | "[Off] to stop"; |
476 | #endif | 491 | #endif |