forked from len0rd/rockbox
[BugFix] YesNo screen wait for button release on exit
if you run yesno screens back to back or another screen with wait_for_release you may never see the release instead clear anything in the queue but release events Change-Id: I1b1e42cbb44f2fdfed441ab1f217b6ea4fe07492
This commit is contained in:
parent
e5690803c6
commit
54333536fe
4 changed files with 16 additions and 1 deletions
|
@ -185,6 +185,20 @@ void button_clear_queue(void)
|
|||
queue_clear(&button_queue);
|
||||
}
|
||||
|
||||
/* clears anything but release and sysevents */
|
||||
void button_clear_pressed(void)
|
||||
{
|
||||
long button;
|
||||
for (int count = queue_count(&button_queue); count > 0; count--)
|
||||
{
|
||||
button = button_get(false);
|
||||
if (button & (BUTTON_REL | SYS_EVENT))
|
||||
{
|
||||
button_queue_post(button, button_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long button_get_w_tmo(int ticks)
|
||||
{
|
||||
struct queue_event ev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue