Yes/No Screen: Allow accept to be button release

Allows the ACTION_YESNO_ACCEPT action to be set
to a button release by ignoring certain system events.

Moving USB init in main.c to the last thing to prevent
getting stuck in the USB prompt, if enabled.
Also changing ACTION_YESNO_ACCEPT to button release on erosq

Change-Id: I5e7498521a13cb4e840223dd0b9c8633e99093bc
This commit is contained in:
Dana Conrad 2021-05-16 15:01:26 -05:00
parent 10d199f9d5
commit 8056b7fd1a
3 changed files with 13 additions and 5 deletions

View file

@ -118,7 +118,7 @@ static const struct button_mapping button_context_tree[] = {
}; /* button_context_tree */
static const struct button_mapping button_context_yesno[] = {
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY|BUTTON_REL, BUTTON_NONE },
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD),
}; /* button_context_settings_yesno */