summaryrefslogtreecommitdiffstats
path: root/apps/plugins/metronome.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-11-26 07:20:04 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-11-26 07:20:04 +0000
commitfee5ca256bd655bd2881de8448218c7d817bb028 (patch)
treec74f5fb464c783976985e8e932f2b4f74ff8d052 /apps/plugins/metronome.c
parentcee9d3b47b9235a88a034892cb5d38564788219e (diff)
downloadrockbox-fee5ca256bd655bd2881de8448218c7d817bb028.tar.gz
rockbox-fee5ca256bd655bd2881de8448218c7d817bb028.zip
fix metronome keys
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11597 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/metronome.c')
-rw-r--r--apps/plugins/metronome.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index 5a22c973e5..ca4b1a6b6c 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -26,28 +26,34 @@ PLUGIN_HEADER
#define METRONOME_VOL_DOWN PLA_DOWN
#define METRONOME_VOL_UP_REP PLA_UP_REPEAT
#define METRONOME_VOL_DOWN_REP PLA_DOWN_REPEAT
-#define METRONOME_TAP PLA_START
#define METRONOME_LEFT PLA_LEFT
#define METRONOME_RIGHT PLA_RIGHT
#define METRONOME_LEFT_REP PLA_LEFT_REPEAT
#define METRONOME_RIGHT_REP PLA_RIGHT_REPEAT
enum {
METRONOME_PLAY_TAP = LAST_PLUGINLIB_ACTION+1,
+#if CONFIG_KEYPAD == ONDIO_PAD
METRONOME_PAUSE,
+#endif
+#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
METRONOME_SYNC
+#endif
};
#if CONFIG_KEYPAD == ONDIO_PAD
+#define METRONOME_TAP PLA_START
#define METRONOME_MSG_START "start: mode"
#define METRONOME_MSG_STOP "pause: hold mode"
static const struct button_mapping ondio_action[] =
{
{METRONOME_PLAY_TAP, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
- {METRONOME_PAUSE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE }
+ {METRONOME_PAUSE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
+ {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
};
#else
-#define METRONOME_PLAYPAUSE PLA_FIRE
+#define METRONOME_TAP PLA_FIRE
+#define METRONOME_PLAYPAUSE PLA_START
#define METRONOME_MSG_START "press play"
#define METRONOME_MSG_STOP "press pause"
@@ -55,6 +61,7 @@ static const struct button_mapping ondio_action[] =
static const struct button_mapping iriver_syncaction[] =
{
{METRONOME_SYNC, BUTTON_REC, BUTTON_NONE },
+ {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
};
#endif
#endif /* #if CONFIG_KEYPAD == ONDIO_PAD */
@@ -972,13 +979,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
change_bpm(1);
break;
-#if CONFIG_KEYPAD != ONDIO_PAD
+#ifdef METRONOME_TAP
case METRONOME_TAP:
tap();
break;
#endif
-#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
+#if METRONOME_SYNC
case METRONOME_SYNC:
minitick = period;
break;