summaryrefslogtreecommitdiff
path: root/apps/plugins/flipit.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-12-14 01:31:37 +0000
committerDave Chapman <dave@dchapman.com>2005-12-14 01:31:37 +0000
commit54d44c893f0d0ed4403ae7af220224e6646f6dda (patch)
treeb5665adfe8b496dfbce73ce65d4f8151495b0c9b /apps/plugins/flipit.c
parentc75425511ea8d0bfdb77d4336117ec7114ef87c8 (diff)
iPod: Initial attempt at button mappings for plugins. All plugins now compile, but more work is needed with the more complex ones to make them iPod friendly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8233 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/flipit.c')
-rw-r--r--apps/plugins/flipit.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index 36411c2978..da449d397c 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -21,6 +21,8 @@
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
+#define FLIPIT_UP BUTTON_UP
+#define FLIPIT_DOWN BUTTON_DOWN
#define FLIPIT_QUIT BUTTON_OFF
#define FLIPIT_SHUFFLE BUTTON_F1
#define FLIPIT_SOLVE BUTTON_F2
@@ -28,6 +30,8 @@
#define FLIPIT_TOGGLE BUTTON_PLAY
#elif CONFIG_KEYPAD == ONDIO_PAD
+#define FLIPIT_UP BUTTON_UP
+#define FLIPIT_DOWN BUTTON_DOWN
#define FLIPIT_QUIT BUTTON_OFF
#define FLIPIT_SHUFFLE (BUTTON_MENU | BUTTON_LEFT)
#define FLIPIT_SOLVE (BUTTON_MENU | BUTTON_UP)
@@ -37,6 +41,8 @@
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
+#define FLIPIT_UP BUTTON_UP
+#define FLIPIT_DOWN BUTTON_DOWN
#define FLIPIT_QUIT BUTTON_OFF
#define FLIPIT_SHUFFLE BUTTON_MODE
#define FLIPIT_SOLVE BUTTON_ON
@@ -44,6 +50,17 @@
#define FLIPIT_TOGGLE_PRE BUTTON_SELECT
#define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL)
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+
+#define FLIPIT_UP BUTTON_SCROLL_FWD
+#define FLIPIT_DOWN BUTTON_SCROLL_BACK
+#define FLIPIT_QUIT BUTTON_MENU
+#define FLIPIT_SHUFFLE (BUTTON_SELECT | BUTTON_LEFT)
+#define FLIPIT_SOLVE (BUTTON_SELECT | BUTTON_PLAY)
+#define FLIPIT_STEP_BY_STEP (BUTTON_SELECT | BUTTON_MENU)
+#define FLIPIT_TOGGLE_PRE BUTTON_SELECT
+#define FLIPIT_TOGGLE (BUTTON_SELECT | BUTTON_REL)
+
#endif
static struct plugin_api* rb;
@@ -252,12 +269,12 @@ static bool flipit_loop(void) {
move_cursor(1, 0);
break;
- case BUTTON_UP:
+ case FLIPIT_UP:
if ((cursor_pos/5)>0)
move_cursor(0, -1);
break;
- case BUTTON_DOWN:
+ case FLIPIT_DOWN:
if ((cursor_pos/5)<3)
move_cursor(0, 1);
break;