forked from len0rd/rockbox
add separate button defines for the Gigabeat remote control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13442 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4c486ce948
commit
0037a1b648
3 changed files with 73 additions and 11 deletions
|
@ -269,8 +269,61 @@ static const struct button_mapping button_context_keyboard[] = {
|
|||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_keyboard */
|
||||
|
||||
/*****************************************************************************
|
||||
* Remote control mappings
|
||||
*****************************************************************************/
|
||||
|
||||
static const struct button_mapping remote_button_context_standard[] = {
|
||||
{ ACTION_STD_PREV, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE },
|
||||
{ ACTION_STD_OK, BUTTON_RC_FF, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
};
|
||||
|
||||
static const struct button_mapping remote_button_context_wps[] = {
|
||||
{ ACTION_WPS_PLAY, BUTTON_RC_PLAY, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_SKIPNEXT, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF },
|
||||
{ ACTION_WPS_SKIPPREV, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW },
|
||||
|
||||
{ ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT },
|
||||
|
||||
{ ACTION_WPS_STOP, BUTTON_RC_DSP, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
};
|
||||
|
||||
static const struct button_mapping* get_context_mapping_remote( int context )
|
||||
{
|
||||
context ^= CONTEXT_REMOTE;
|
||||
|
||||
switch (context)
|
||||
{
|
||||
case CONTEXT_WPS:
|
||||
return remote_button_context_wps;
|
||||
|
||||
default:
|
||||
return remote_button_context_standard;
|
||||
}
|
||||
}
|
||||
|
||||
const struct button_mapping* get_context_mapping(int context)
|
||||
{
|
||||
if (context&CONTEXT_REMOTE)
|
||||
return get_context_mapping_remote(context);
|
||||
|
||||
switch (context)
|
||||
{
|
||||
case CONTEXT_STD:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue