1
0
Fork 0
forked from len0rd/rockbox

touchscreen: Use pointing mode in the yes/no screen

Seems to fix the unintuitive / inaccurate behavior of this screen.
Rejigger the generic touchscreen keymap because the 3x3 buttons are
no longer used. Also map physical keys for yes/no on the Q1.

Change-Id: I2ed633896b87030fa654d47d9d02929b849495da
This commit is contained in:
Aidan MacDonald 2021-08-10 21:27:28 +01:00
parent a8063054f9
commit 69420e796c
3 changed files with 28 additions and 4 deletions

View file

@ -57,6 +57,13 @@ static const struct button_mapping button_context_list[] = {
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
}; /* button_context_list */
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
}; /* button_context_yesno */
const struct button_mapping* target_get_context_mapping(int context)
{
switch (context)
@ -73,5 +80,7 @@ const struct button_mapping* target_get_context_mapping(int context)
//return button_context_tree;
case CONTEXT_LIST:
return button_context_list;
case CONTEXT_YESNOSCREEN:
return button_context_yesno;
}
}

View file

@ -179,8 +179,6 @@ static const struct button_mapping button_context_mainmenu[] =
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_TOPRIGHT, BUTTON_NONE },
{ ACTION_YESNO_ACCEPT, BUTTON_BOTTOMLEFT, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM2|CONTEXT_YESNOSCREEN)
}; /* button_context_settings_yesno */