forked from len0rd/rockbox
fix ondios again. Add a context for left/right/fire actions which seems
to work well git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11546 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
514f45bc1c
commit
73e31d1af3
2 changed files with 64 additions and 3 deletions
|
@ -2337,7 +2337,7 @@ static int bubbles_handlebuttons(struct game_context* bb, bool animblock,
|
||||||
int buttonres;
|
int buttonres;
|
||||||
long start;
|
long start;
|
||||||
const struct button_mapping *plugin_contexts[]
|
const struct button_mapping *plugin_contexts[]
|
||||||
= {generic_directions,generic_actions};
|
= {generic_left_right_fire,generic_actions};
|
||||||
button = pluginlib_getaction(rb,timeout,plugin_contexts,2);
|
button = pluginlib_getaction(rb,timeout,plugin_contexts,2);
|
||||||
|
|
||||||
#ifdef HAS_BUTTON_HOLD
|
#ifdef HAS_BUTTON_HOLD
|
||||||
|
@ -2417,7 +2417,7 @@ static int bubbles(struct game_context* bb) {
|
||||||
bool showscores = false;
|
bool showscores = false;
|
||||||
long timeout;
|
long timeout;
|
||||||
const struct button_mapping *plugin_contexts[]
|
const struct button_mapping *plugin_contexts[]
|
||||||
= {generic_directions,generic_actions};
|
= {generic_actions,generic_directions};
|
||||||
|
|
||||||
bubbles_setcolors();
|
bubbles_setcolors();
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,67 @@ static const struct button_mapping generic_directions[] =
|
||||||
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
{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 */
|
/* these were taken from the bubbles plugin, so may need tweaking */
|
||||||
static const struct button_mapping generic_actions[] =
|
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)
|
#elif (CONFIG_KEYPAD == IPOD_3G_PAD) || (CONFIG_KEYPAD == IPOD_4G_PAD)
|
||||||
{PLA_QUIT, BUTTON_MENU|BUTTON_SELECT, BUTTON_NONE},
|
{PLA_QUIT, BUTTON_MENU|BUTTON_SELECT, BUTTON_NONE},
|
||||||
{PLA_START, BUTTON_PLAY|BUTTON_REL, BUTTON_PLAY},
|
{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, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT},
|
||||||
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
{PLA_FIRE_REPEAT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_NONE},
|
||||||
#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
|
#elif CONFIG_KEYPAD == IAUDIO_X5_PAD
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue