Yes/No Screen Keymap: add fallbacks to targets lacking them

With the addition of ignoring unknown actions to the yes/no
screen, several (mostly older) targets won't have keys defined
to cancel out of the yes/no screen.

Adding fallbacks to standard context to correct this.

Targets:
Shanling Q1 - changed, untested (doesn't appear sim has buttons mapped)
Sansa Connect - changed, untested (can't figure out sim keys)

HM60x - changed, untested (sim won't build)
HM801 - changed, untested (sim won't build)
ihifi - changed, untested (sim won't build)
MA - changed, untested (sim won't build)

M3 - changed, tested on sim
X5 - changed, tested on sim
MPIO HD300 - changed, sim tested
MPIO HD200 - changed, sim tested (remote not tested)
Vibe 500 - changed, sim tested

Change-Id: Ib5290ada8e12bb845d3840e481e8533515b42e95
This commit is contained in:
Dana Conrad 2021-09-05 11:27:33 -05:00 committed by Aidan MacDonald
parent 95b10ac74e
commit d435bb77b5
11 changed files with 26 additions and 14 deletions

View File

@ -176,7 +176,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = {
/** Yes/No Screen **/
static const struct button_mapping button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesnoscreen */
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */

View File

@ -202,7 +202,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = {
/** Yes/No Screen **/
static const struct button_mapping button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesnoscreen */
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */

View File

@ -175,7 +175,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = {
/** Yes/No Screen **/
static const struct button_mapping button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesnoscreen */
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */

View File

@ -379,12 +379,12 @@ static const struct button_mapping remote_button_context_wps[] = {
/** Yes/No Screen **/
static const struct button_mapping button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesnoscreen */
static const struct button_mapping remote_button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* remote_button_context_yesnoscreen */

View File

@ -183,7 +183,7 @@ static const struct button_mapping button_context_tree_scroll_lr[] = {
/** Yes/No Screen **/
static const struct button_mapping button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesnoscreen */
/* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */

View File

@ -105,8 +105,10 @@ static const struct button_mapping button_context_settings[] = {
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_FUNC, BUTTON_NONE },
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_VOL_UP, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_VOL_DOWN, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesno */
static const struct button_mapping button_context_bmark[] = {
@ -269,7 +271,7 @@ static const struct button_mapping button_rc_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_RC_FUNC, BUTTON_NONE },
{ ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesno */
static const struct button_mapping button_rc_context_radio[] = {

View File

@ -109,8 +109,11 @@ static const struct button_mapping button_context_settings[] = {
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_ENTER, BUTTON_NONE },
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_REW, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_FF, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesno */
static const struct button_mapping button_context_bmark[] = {

View File

@ -70,7 +70,12 @@ static const struct button_mapping button_context_wps[] = {
static const struct button_mapping button_context_yesno[] = {
{ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE},
LAST_ITEM_IN_LIST
{ACTION_STD_CANCEL, BUTTON_PREV, BUTTON_NONE},
{ACTION_STD_CANCEL, BUTTON_NEXT, BUTTON_NONE},
{ACTION_STD_CANCEL, BUTTON_VOL_UP, BUTTON_NONE},
{ACTION_STD_CANCEL, BUTTON_VOL_DOWN, BUTTON_NONE},
{ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE},
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesno */
static const struct button_mapping button_context_settings_time[] = {

View File

@ -64,7 +64,7 @@ static const struct button_mapping button_context_yesno[] = {
/* note: touchscreen buttons are usable in addition to physical keys */
{ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE},
{ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE},
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesno */
const struct button_mapping* target_get_context_mapping(int context)

View File

@ -113,7 +113,9 @@ static const struct button_mapping button_context_settings[] = {
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_OK, BUTTON_NONE },
LAST_ITEM_IN_LIST
{ ACTION_STD_CANCEL, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_STD_CANCEL, BUTTON_REC, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_yesno */
static const struct button_mapping button_context_bmark[] = {

View File

@ -405,12 +405,12 @@ static const struct button_mapping remote_button_context_wps[] = {
/** Yes/No Screen **/
static const struct button_mapping button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_settings_yesnoscreen */
static const struct button_mapping remote_button_context_yesnoscreen[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_RC_PLAY, BUTTON_NONE },
LAST_ITEM_IN_LIST
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* remote_button_context_settings_yesnoscreen */