forked from len0rd/rockbox
Fixed the problems on the new version of the fire plugin (so repush it), added new actions to the pluginlib_actions to fix the keymaps on the Sansa e200 for the clock and fire plugins. Also slightly simplified the metronome plugin's key mapping with those new actions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16148 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8a91c19f70
commit
ebe5acfb9d
6 changed files with 265 additions and 307 deletions
|
|
@ -24,3 +24,11 @@ long fsqrt(long a, unsigned int fracbits);
|
|||
long cos_int(int val);
|
||||
long sin_int(int val);
|
||||
long flog(int x);
|
||||
|
||||
/* fast unsigned multiplication (16x16bit->32bit or 32x32bit->32bit,
|
||||
* whichever is faster for the architecture) */
|
||||
#ifdef CPU_ARM
|
||||
#define FMULU(a, b) ((uint32_t) (((uint32_t) (a)) * ((uint32_t) (b))))
|
||||
#else /* SH1, coldfire */
|
||||
#define FMULU(a, b) ((uint32_t) (((uint16_t) (a)) * ((uint16_t) (b))))
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -335,6 +335,54 @@ const struct button_mapping generic_actions[] =
|
|||
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
||||
};
|
||||
|
||||
const struct button_mapping generic_increase_decrease[] =
|
||||
{
|
||||
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) \
|
||||
|| (CONFIG_KEYPAD == IRIVER_H300_PAD) \
|
||||
|| (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \
|
||||
|| (CONFIG_KEYPAD == GIGABEAT_PAD) \
|
||||
|| (CONFIG_KEYPAD == RECORDER_PAD) \
|
||||
|| (CONFIG_KEYPAD == ARCHOS_AV300_PAD) \
|
||||
|| (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD) \
|
||||
|| (CONFIG_KEYPAD == ONDIO_PAD) \
|
||||
|| (CONFIG_KEYPAD == COWOND2_PAD)
|
||||
{PLA_INC, BUTTON_UP, BUTTON_NONE},
|
||||
{PLA_DEC, BUTTON_DOWN, BUTTON_NONE},
|
||||
{PLA_INC_REPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE},
|
||||
{PLA_DEC_REPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
||||
#elif (CONFIG_KEYPAD == SANSA_C200_PAD)
|
||||
{PLA_INC, BUTTON_VOL_UP, BUTTON_NONE},
|
||||
{PLA_DEC, BUTTON_VOL_DOWN, BUTTON_NONE},
|
||||
{PLA_INC_REPEAT, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
||||
{PLA_DEC_REPEAT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
||||
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) \
|
||||
|| (CONFIG_KEYPAD == IPOD_3G_PAD) \
|
||||
|| (CONFIG_KEYPAD == SANSA_E200_PAD) \
|
||||
|| (CONFIG_KEYPAD == IPOD_4G_PAD)
|
||||
{PLA_INC, BUTTON_SCROLL_FWD, BUTTON_NONE},
|
||||
{PLA_DEC, BUTTON_SCROLL_BACK, BUTTON_NONE},
|
||||
{PLA_INC_REPEAT, BUTTON_SCROLL_FWD|BUTTON_REPEAT, BUTTON_NONE},
|
||||
{PLA_DEC_REPEAT, BUTTON_SCROLL_BACK|BUTTON_REPEAT, BUTTON_NONE},
|
||||
#elif CONFIG_KEYPAD == PLAYER_PAD
|
||||
{PLA_INC, BUTTON_STOP, BUTTON_NONE},
|
||||
{PLA_DEC, BUTTON_PLAY, BUTTON_NONE},
|
||||
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD) \
|
||||
|| (CONFIG_KEYPAD == MROBE100_PAD)
|
||||
{PLA_INC, BUTTON_SCROLL_UP, BUTTON_NONE},
|
||||
{PLA_DEC, BUTTON_SCROLL_DOWN, BUTTON_NONE},
|
||||
{PLA_INC_REPEAT, BUTTON_SCROLL_UP|BUTTON_REPEAT, BUTTON_NONE},
|
||||
{PLA_DEC_REPEAT, BUTTON_SCROLL_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
||||
#elif (CONFIG_KEYPAD == MROBE500_PAD)
|
||||
{PLA_INC, BUTTON_RC_PLAY, BUTTON_NONE},
|
||||
{PLA_DEC, BUTTON_RC_DOWN, BUTTON_NONE},
|
||||
{PLA_INC_REPEAT, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE},
|
||||
{PLA_DEC_REPEAT, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE},
|
||||
#else
|
||||
#error pluginlib_actions: Unsupported keypad
|
||||
#endif
|
||||
{CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
|
||||
};
|
||||
|
||||
static struct button_mapping **plugin_context_order;
|
||||
static int plugin_context_count = 0;
|
||||
static int last_context = 0; /* index into plugin_context_order
|
||||
|
|
|
|||
|
|
@ -35,7 +35,12 @@ enum {
|
|||
PLA_DOWN_REPEAT,
|
||||
PLA_LEFT_REPEAT,
|
||||
PLA_RIGHT_REPEAT,
|
||||
|
||||
|
||||
PLA_INC,
|
||||
PLA_DEC,
|
||||
PLA_INC_REPEAT,
|
||||
PLA_DEC_REPEAT,
|
||||
|
||||
PLA_QUIT,
|
||||
PLA_START,
|
||||
PLA_MENU,
|
||||
|
|
@ -51,6 +56,7 @@ extern const struct button_mapping remote_directions[];
|
|||
extern const struct button_mapping generic_directions[];
|
||||
extern const struct button_mapping generic_left_right_fire[];
|
||||
extern const struct button_mapping generic_actions[];
|
||||
extern const struct button_mapping generic_increase_decrease[];
|
||||
|
||||
int pluginlib_getaction(struct plugin_api *api,int timeout,
|
||||
const struct button_mapping *plugin_contexts[],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue