summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapps/plugins/bubbles.c4
-rw-r--r--apps/plugins/lib/pluginlib_actions.h63
2 files changed, 64 insertions, 3 deletions
diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c
index efc32f8a85..254539603f 100755
--- a/apps/plugins/bubbles.c
+++ b/apps/plugins/bubbles.c
@@ -2337,7 +2337,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock,
int buttonres;
long start;
const struct button_mapping *plugin_contexts[]
- = {generic_directions,generic_actions};
+ = {generic_left_right_fire,generic_actions};
button = pluginlib_getaction(rb,timeout,plugin_contexts,2);
#ifdef HAS_BUTTON_HOLD
@@ -2417,7 +2417,7 @@ static int bubbles(struct game_context* bb) {
bool showscores = false;
long timeout;
const struct button_mapping *plugin_contexts[]
- = {generic_directions,generic_actions};
+ = {generic_actions,generic_directions};
bubbles_setcolors();
diff --git a/apps/plugins/lib/pluginlib_actions.h b/apps/plugins/lib/pluginlib_actions.h
index 80c559d492..baf7d82fce 100644
--- a/apps/plugins/lib/pluginlib_actions.h
+++ b/apps/plugins/lib/pluginlib_actions.h
@@ -104,6 +104,67 @@ static const struct button_mapping generic_directions[] =
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
};
+static const struct button_mapping generic_left_right_fire[] =
+{
+#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
+ || (CONFIG_KEYPAD == IRIVER_H300_PAD) \
+ || (CONFIG_KEYPAD == IAUDIO_X5_PAD) \
+ || (CONFIG_KEYPAD == GIGABEAT_PAD) \
+ || (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
+ { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
+#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
+ { PLA_LEFT, BUTTON_SCROLL_BACK, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_SCROLL_FWD, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_SCROLL_BACK, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_SCROLL_FWD, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
+#elif CONFIG_KEYPAD == ONDIO_PAD
+ { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_UP, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
+#elif CONFIG_KEYPAD == PLAYER_PAD
+ { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_ON, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_ON|BUTTON_REPEAT, BUTTON_NONE},
+#elif CONFIG_KEYPAD == RECORDER_PAD
+ { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_PLAY, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_PLAY|BUTTON_REPEAT, BUTTON_NONE},
+#elif (CONFIG_KEYPAD == SANSA_E200_PAD)
+ { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_SELECT, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_NONE},
+#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
+ { PLA_LEFT, BUTTON_LEFT, BUTTON_NONE},
+ { PLA_RIGHT, BUTTON_RIGHT, BUTTON_NONE},
+ { PLA_LEFT_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_RIGHT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ { PLA_FIRE, BUTTON_REW, BUTTON_NONE},
+ { PLA_FIRE_REPEAT, BUTTON_REW|BUTTON_REPEAT, BUTTON_NONE},
+#else
+ #error pluginlib_actions: Unsupported keypad
+#endif
+ {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
+};
+
/* these were taken from the bubbles plugin, so may need tweaking */
static const struct button_mapping generic_actions[] =
{
@@ -117,7 +178,7 @@ static const struct button_mapping generic_actions[] =
#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
{PLA_QUIT, BUTTON_MENU|BUTTON_SELECT, BUTTON_NONE},
{PLA_START, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
- {PLA_MENU, BUTTON_MENU, BUTTON_NONE},
+ {PLA_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_NONE},
{PLA_FIRE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
#elif CONFIG_KEYPAD == IAUDIO_X5_PAD